diff --git a/packages/frontend/src/preferences.ts b/packages/frontend/src/preferences.ts index 73c89e23af..2208f75094 100644 --- a/packages/frontend/src/preferences.ts +++ b/packages/frontend/src/preferences.ts @@ -86,7 +86,7 @@ const storageProvider: StorageProvider = { }); }, - cloudGets: async (ctx) => { + cloudGetBulk: async (ctx) => { // TODO: 値の取得を1つのリクエストで済ませたい(バックエンド側でAPIの新設が必要) const fetchings = ctx.needs.map(need => storageProvider.cloudGet(need).then(res => [need.key, res] as const)); const cloudDatas = await Promise.all(fetchings); diff --git a/packages/frontend/src/preferences/manager.ts b/packages/frontend/src/preferences/manager.ts index f96aa2f368..cac659f1fe 100644 --- a/packages/frontend/src/preferences/manager.ts +++ b/packages/frontend/src/preferences/manager.ts @@ -79,7 +79,7 @@ export type PreferencesProfile = { export type StorageProvider = { save: (ctx: { profile: PreferencesProfile; }) => void; - cloudGets: (ctx: { needs: { key: K; scope: Scope; }[] }) => Promise>>>; + cloudGetBulk: (ctx: { needs: { key: K; scope: Scope; }[] }) => Promise>>>; cloudGet: (ctx: { key: K; scope: Scope; }) => Promise<{ value: ValueOf; } | null>; cloudSet: (ctx: { key: K; scope: Scope; value: ValueOf; }) => Promise; }; @@ -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; diff --git a/packages/frontend/src/preferences/utility.ts b/packages/frontend/src/preferences/utility.ts index af5b178df6..a6687251af 100644 --- a/packages/frontend/src/preferences/utility.ts +++ b/packages/frontend/src/preferences/utility.ts @@ -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', {