feat: upgrade to masto.js v6 (#2530)
This commit is contained in:
parent
d8ea685803
commit
6c5bb83ac3
62 changed files with 262 additions and 263 deletions
|
@ -43,7 +43,9 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
|
|||
}
|
||||
|
||||
// If we're logged in, search for the local id the account or status corresponds to
|
||||
const { accounts, statuses } = await masto.client.value.v2.search({ q: `https:/${to.fullPath}`, resolve: true, limit: 1 })
|
||||
const paginator = masto.client.value.v2.search.list({ q: `https:/${to.fullPath}`, resolve: true, limit: 1 })
|
||||
const { accounts, statuses } = (await paginator.next()).value ?? { accounts: [], statuses: [] }
|
||||
|
||||
if (statuses[0])
|
||||
return getStatusRoute(statuses[0])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue