Spaces:
Sleeping
Sleeping
Download frontend/src/auth/token.js from Caner7/Muhasebe: direct link, hf CLI and curl.
- Browser
- Download file 360 Bytes
-
https://huggingface.co/spaces/Caner7/Muhasebe/resolve/main/frontend/src/auth/token.js
- Command line
-
hf download hf://spaces/Caner7/Muhasebe/frontend/src/auth/token.js
-
curl -L -o token.js https://huggingface.co/spaces/Caner7/Muhasebe/resolve/main/frontend/src/auth/token.js
360 Bytes
| /** localStorage anahtarı: backend ile uyumlu bearer token saklama. */ | |
| export const TOKEN_KEY = "muhasebe_auth_token"; | |
| export function getAuthToken() { | |
| return localStorage.getItem(TOKEN_KEY) || ""; | |
| } | |
| export function setAuthToken(token) { | |
| if (!token) { | |
| localStorage.removeItem(TOKEN_KEY); | |
| return; | |
| } | |
| localStorage.setItem(TOKEN_KEY, token); | |
| } | |