refactor: inject masto instance via nuxt app (#134)
This commit is contained in:
parent
5c60497421
commit
39b005899e
26 changed files with 67 additions and 48 deletions
|
@ -11,7 +11,7 @@ let relationship = $(useRelationship(account))
|
|||
async function toggleFollow() {
|
||||
relationship!.following = !relationship!.following
|
||||
try {
|
||||
relationship = await masto.accounts[relationship!.following ? 'follow' : 'unfollow'](account.id)
|
||||
relationship = await useMasto().accounts[relationship!.following ? 'follow' : 'unfollow'](account.id)
|
||||
}
|
||||
catch {
|
||||
// TODO error handling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue