1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-03 11:26:14 +02:00
This commit is contained in:
syuilo
2025-05-07 16:10:43 +09:00
parent 86996d9563
commit 5603cb7e22
3 changed files with 4 additions and 4 deletions

View File

@@ -79,7 +79,7 @@ export type PreferencesProfile = {
export type StorageProvider = {
save: (ctx: { profile: PreferencesProfile; }) => void;
cloudGets: <K extends keyof PREF>(ctx: { needs: { key: K; scope: Scope; }[] }) => Promise<Partial<Record<K, ValueOf<K>>>>;
cloudGetBulk: <K extends keyof PREF>(ctx: { needs: { key: K; scope: Scope; }[] }) => Promise<Partial<Record<K, ValueOf<K>>>>;
cloudGet: <K extends keyof PREF>(ctx: { key: K; scope: Scope; }) => Promise<{ value: ValueOf<K>; } | null>;
cloudSet: <K extends keyof PREF>(ctx: { key: K; scope: Scope; value: ValueOf<K>; }) => Promise<void>;
};
@@ -240,7 +240,7 @@ export class PreferencesManager {
}
}
const cloudValues = await this.storageProvider.cloudGets({ needs });
const cloudValues = await this.storageProvider.cloudGetBulk({ needs });
for (const _key in PREF_DEF) {
const key = _key as keyof PREF;

View File

@@ -140,7 +140,7 @@ function importProfile() {
export async function cloudBackup() {
if ($i == null) return;
if (!canAutoBackup()) {
throw new Error('Profile name is not set');
throw new Error('cannot auto backup for this profile');
}
await misskeyApi('i/registry/set', {