feat: add endpoint for retrieving user space credits and implement caching mechanism in UserService

This commit is contained in:
Junyan Qin
2025-12-29 22:23:11 +08:00
parent f11e01b549
commit 9c82eeddeb
8 changed files with 125 additions and 31 deletions
+4
View File
@@ -731,6 +731,10 @@ export class BackendClient extends BaseHttpClient {
return this.get('/api/v1/user/info');
}
public getSpaceCredits(): Promise<{ credits: number | null }> {
return this.get('/api/v1/user/space-credits');
}
public getAccountInfo(): Promise<{
initialized: boolean;
account_type?: 'local' | 'space';