This commit is contained in:
Ironsp
2026-05-11 15:25:09 +08:00
parent a29a26e391
commit 31dc367e87
360 changed files with 29979 additions and 0 deletions

9
src/utils/auth.ts Normal file
View File

@@ -0,0 +1,9 @@
const TokenKey = 'Admin-Token';
const tokenStorage = useStorage<null | string>(TokenKey, null);
export const getToken = () => tokenStorage.value;
export const setToken = (access_token: string) => (tokenStorage.value = access_token);
export const removeToken = () => (tokenStorage.value = null);