chore: fix remaining type mismatch
This commit is contained in:
parent
b0269c4366
commit
3ea6e4448e
2 changed files with 3 additions and 3 deletions
|
|
@ -74,7 +74,7 @@ export async function fetchAccountByHandle(acct: string): Promise<mastodon.v1.Ac
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const userAcctDomain = userAcct.includes('@') ? userAcct : `${userAcct}@${domain}`
|
const userAcctDomain = userAcct.includes('@') ? userAcct : `${userAcct}@${domain}`
|
||||||
account = (await client.v1.search.fetch({ q: `@${userAcctDomain}`, type: 'accounts' })).accounts[0]
|
account = (await client.v1.search.list({ q: `@${userAcctDomain}`, type: 'accounts' })).accounts[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (account.acct && !account.acct.includes('@') && domain)
|
if (account.acct && !account.acct.includes('@') && domain)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export function useSearch(query: MaybeRefOrGetter<string>, options: UseSearchOpt
|
||||||
|
|
||||||
const q = computed(() => resolveUnref(query).trim())
|
const q = computed(() => resolveUnref(query).trim())
|
||||||
|
|
||||||
let paginator: mastodon.Paginator<mastodon.v2.Search, mastodon.rest.v2.SearchParams> | undefined
|
let paginator: AsyncIterableIterator<mastodon.v2.Search, mastodon.rest.v2.SearchParams> | undefined
|
||||||
|
|
||||||
const appendResults = (results: mastodon.v2.Search, empty = false) => {
|
const appendResults = (results: mastodon.v2.Search, empty = false) => {
|
||||||
if (empty) {
|
if (empty) {
|
||||||
|
|
@ -76,7 +76,7 @@ export function useSearch(query: MaybeRefOrGetter<string>, options: UseSearchOpt
|
||||||
q: q.value,
|
q: q.value,
|
||||||
...resolveUnref(options),
|
...resolveUnref(options),
|
||||||
resolve: !!currentUser.value,
|
resolve: !!currentUser.value,
|
||||||
})
|
}).values()
|
||||||
const nextResults = await paginator.next()
|
const nextResults = await paginator.next()
|
||||||
|
|
||||||
done.value = !!nextResults.done
|
done.value = !!nextResults.done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue