refactor(frontend): lint, one session guard, one request helper, one user context

This commit is contained in:
lobo committed 2026-09-29 15:40:55 +02:00
1 parent 111ab1e200
commit d0ea9e900d
78 files changed
+2138 -624

No files matched your search

+3 -1
View File
@@ -22,10 +22,12 @@ export const cacheLanguage = (language) => {
}
};
export const ME_URL = () => `${import.meta.env.VITE_API_URL}/api/users/me?v=1`;
/**
* GET /api/users/me on Auth. The caller handles the response status.
*/
export const fetchMe = () => apiFetch(`${import.meta.env.VITE_API_URL}/api/users/me?v=1`, {
export const fetchMe = () => apiFetch(ME_URL(), {
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
});