Update userToken.tsx

This commit is contained in:
Justin Edmund 2024-01-08 04:31:46 -08:00
parent 066a2238df
commit 8a3cda5c95

View file

@ -39,16 +39,14 @@ export const setHeaders = (
}
export const storeEditKey = (id: string, key: string) => {
ls(id, key)
const stored = set(id, key)
if (stored) setEditKey(id)
return stored
}
export const setEditKey = (id: string, user?: User) => {
if (!user) {
const edit_key = get<string>(id)
axios.defaults.headers.common['X-Edit-Key'] = edit_key
} else {
unsetEditKey()
}
export const setEditKey = (id: string) => {
const edit_key = get<string>(id)
axios.defaults.headers.common['X-Edit-Key'] = edit_key
}
export const unsetEditKey = () => {