feat(client): profile improvements
Some checks failed
Client CMS Check Build (NixCN CMS) TeamCity build failed
Backend Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2026-01-29 22:17:16 +08:00
parent 5da6e9ce25
commit b70095c99e
21 changed files with 1114 additions and 83 deletions

View File

@@ -1,4 +1,5 @@
import { postAuthRefresh, type ServiceAuthTokenResponse } from '@/client';
import type { ServiceAuthTokenResponse } from '@/client';
import { postAuthRefresh } from '@/client';
export function setToken(token: string) {
localStorage.setItem('token', token);
@@ -32,8 +33,8 @@ export function clearTokens() {
export async function doRefreshToken(): Promise<ServiceAuthTokenResponse | undefined> {
const { data } = await postAuthRefresh({
body: {
refresh_token: getRefreshToken()!
}
refresh_token: getRefreshToken()!,
},
});
return data?.data;
}