From 9eac1da4c24d5dfaa04a3a27c696a4214d9e6c01 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 24 Nov 2022 13:49:50 +0800 Subject: [PATCH] fix: fetch account by name --- composables/cache.ts | 2 +- pages/@[account]/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composables/cache.ts b/composables/cache.ts index 71361c52..37f632cb 100644 --- a/composables/cache.ts +++ b/composables/cache.ts @@ -46,7 +46,7 @@ export function fetchAccountByName(acct: string) { const cached = cache.get(key) if (cached) return cached - const account = masto.accounts.fetch(acct) + const account = masto.accounts.lookup({ acct }) .then((r) => { cacheAccount(r) return r diff --git a/pages/@[account]/index.vue b/pages/@[account]/index.vue index 37f5dce5..2f04c891 100644 --- a/pages/@[account]/index.vue +++ b/pages/@[account]/index.vue @@ -13,7 +13,7 @@ const tabNames = ['Posts', 'Posts and replies'] as const const tab = $ref('Posts') const paginator = $computed(() => { - return masto.accounts.getStatusesIterable(account.value!.id!, { excludeReplies: tab === 'Posts' } as any) + return masto.accounts.getStatusesIterable(account.id, { excludeReplies: tab === 'Posts' } as any) })