diff --git a/components/account/AccountFollowButton.vue b/components/account/AccountFollowButton.vue index bb7cc240..36916a7d 100644 --- a/components/account/AccountFollowButton.vue +++ b/components/account/AccountFollowButton.vue @@ -19,7 +19,7 @@ const { client } = $(useMasto()) async function unblock() { relationship!.blocking = false try { - const newRel = await client.v1.accounts.unblock(account.id) + const newRel = await client.v1.accounts.$select(account.id).unblock() Object.assign(relationship!, newRel) } catch (err) { @@ -32,7 +32,7 @@ async function unblock() { async function unmute() { relationship!.muting = false try { - const newRel = await client.v1.accounts.unmute(account.id) + const newRel = await client.v1.accounts.$select(account.id).unmute() Object.assign(relationship!, newRel) } catch (err) { diff --git a/components/account/AccountFollowRequestButton.vue b/components/account/AccountFollowRequestButton.vue index 61cab918..2c60a760 100644 --- a/components/account/AccountFollowRequestButton.vue +++ b/components/account/AccountFollowRequestButton.vue @@ -12,7 +12,7 @@ async function authorizeFollowRequest() { relationship!.requestedBy = false relationship!.followedBy = true try { - const newRel = await client.v1.followRequests.authorize(account.id) + const newRel = await client.v1.followRequests.$select(account.id).authorize() Object.assign(relationship!, newRel) } catch (err) { @@ -25,7 +25,7 @@ async function authorizeFollowRequest() { async function rejectFollowRequest() { relationship!.requestedBy = false try { - const newRel = await client.v1.followRequests.reject(account.id) + const newRel = await client.v1.followRequests.$select(account.id).reject() Object.assign(relationship!, newRel) } catch (err) { diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index 85d2cfe5..c97cf369 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -53,7 +53,7 @@ function previewAvatar() { async function toggleNotifications() { relationship!.notifying = !relationship?.notifying try { - const newRel = await client.v1.accounts.follow(account.id, { notify: relationship?.notifying }) + const newRel = await client.v1.accounts.$select(account.id).follow({ notify: relationship?.notifying }) Object.assign(relationship!, newRel) } catch { @@ -97,7 +97,7 @@ async function editNote(event: Event) { if (relationship.note?.trim() === newNote.trim()) return - const newNoteApiResult = await client.v1.accounts.createNote(account.id, { comment: newNote }) + const newNoteApiResult = await client.v1.accounts.$select(account.id).note.create({ comment: newNote }) relationship.note = newNoteApiResult.note personalNoteDraft.value = relationship.note ?? '' } diff --git a/components/account/AccountMoreButton.vue b/components/account/AccountMoreButton.vue index 5c524e9a..3a179fa2 100644 --- a/components/account/AccountMoreButton.vue +++ b/components/account/AccountMoreButton.vue @@ -33,7 +33,7 @@ async function toggleReblogs() { return const showingReblogs = !relationship?.showingReblogs - relationship = await client.v1.accounts.follow(account.id, { reblogs: showingReblogs }) + relationship = await client.v1.accounts.$select(account.id).follow({ reblogs: showingReblogs }) } async function addUserNote() { @@ -44,7 +44,7 @@ async function removeUserNote() { if (!relationship!.note || relationship!.note.length === 0) return - const newNote = await client.v1.accounts.createNote(account.id, { comment: '' }) + const newNote = await client.v1.accounts.$select(account.id).note.create({ comment: '' }) relationship!.note = newNote.note emit('removeNote') } diff --git a/components/account/AccountPaginator.vue b/components/account/AccountPaginator.vue index 86bcccb8..0445439d 100644 --- a/components/account/AccountPaginator.vue +++ b/components/account/AccountPaginator.vue @@ -1,8 +1,8 @@ diff --git a/components/timeline/TimelineDomainBlocks.vue b/components/timeline/TimelineDomainBlocks.vue index 0763e8ec..a4dfcf20 100644 --- a/components/timeline/TimelineDomainBlocks.vue +++ b/components/timeline/TimelineDomainBlocks.vue @@ -3,7 +3,7 @@ const { client } = $(useMasto()) const paginator = client.v1.domainBlocks.list() async function unblock(domain: string) { - await client.v1.domainBlocks.unblock(domain) + await client.v1.domainBlocks.remove({ domain }) } diff --git a/components/timeline/TimelineHome.vue b/components/timeline/TimelineHome.vue index 95793794..905335d3 100644 --- a/components/timeline/TimelineHome.vue +++ b/components/timeline/TimelineHome.vue @@ -1,8 +1,8 @@