mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(server): use feature model (#9932)
This commit is contained in:
@@ -19,7 +19,9 @@ import type { AuthService } from '../services/auth';
|
||||
import type { UserQuotaStore } from '../stores/user-quota';
|
||||
|
||||
export class UserQuota extends Entity {
|
||||
quota$ = new LiveData<NonNullable<QuotaQuery['currentUser']>['quota']>(null);
|
||||
quota$ = new LiveData<NonNullable<QuotaQuery['currentUser']>['quota'] | null>(
|
||||
null
|
||||
);
|
||||
/** Used storage in bytes */
|
||||
used$ = new LiveData<number | null>(null);
|
||||
/** Formatted used storage */
|
||||
|
||||
@@ -74,7 +74,7 @@ export class WorkspaceQuota extends Entity {
|
||||
this.workspaceService.workspace.id,
|
||||
signal
|
||||
);
|
||||
return { quota: data, used: data.usedSize };
|
||||
return { quota: data, used: data.usedStorageQuota };
|
||||
}).pipe(
|
||||
backoffRetry({
|
||||
when: isNetworkError,
|
||||
|
||||
Reference in New Issue
Block a user