mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Basic attachment done
Switch from ky to axios
This commit is contained in:
@ -27,7 +27,7 @@ const fireMutation = async ({
|
||||
res = await client({
|
||||
method: 'post',
|
||||
instance: 'local',
|
||||
endpoint: `statuses/${id}/${prevState ? 'un' : ''}${type}`
|
||||
url: `statuses/${id}/${prevState ? 'un' : ''}${type}`
|
||||
}) // bug in response from Mastodon
|
||||
|
||||
if (!res.body[stateKey] === prevState) {
|
||||
|
@ -20,7 +20,7 @@ const fireMutation = async ({
|
||||
res = await client({
|
||||
method: 'post',
|
||||
instance: 'local',
|
||||
endpoint: `accounts/${id}/${type}`
|
||||
url: `accounts/${id}/${type}`
|
||||
})
|
||||
|
||||
if (res.body[stateKey!] === true) {
|
||||
@ -35,8 +35,8 @@ const fireMutation = async ({
|
||||
res = await client({
|
||||
method: 'post',
|
||||
instance: 'local',
|
||||
endpoint: `reports`,
|
||||
query: {
|
||||
url: `reports`,
|
||||
params: {
|
||||
account_id: id!
|
||||
}
|
||||
})
|
||||
|
@ -10,8 +10,8 @@ const fireMutation = async ({ domain }: { domain: string }) => {
|
||||
const res = await client({
|
||||
method: 'post',
|
||||
instance: 'local',
|
||||
endpoint: `domain_blocks`,
|
||||
query: {
|
||||
url: `domain_blocks`,
|
||||
params: {
|
||||
domain: domain!
|
||||
}
|
||||
})
|
||||
|
@ -22,7 +22,7 @@ const fireMutation = async ({
|
||||
res = await client({
|
||||
method: 'post',
|
||||
instance: 'local',
|
||||
endpoint: `statuses/${id}/${prevState ? 'un' : ''}${type}`
|
||||
url: `statuses/${id}/${prevState ? 'un' : ''}${type}`
|
||||
}) // bug in response from Mastodon
|
||||
|
||||
if (!res.body[stateKey] === prevState) {
|
||||
@ -37,7 +37,7 @@ const fireMutation = async ({
|
||||
res = await client({
|
||||
method: 'delete',
|
||||
instance: 'local',
|
||||
endpoint: `statuses/${id}`
|
||||
url: `statuses/${id}`
|
||||
})
|
||||
|
||||
if (res.body[stateKey] === id) {
|
||||
|
@ -29,7 +29,7 @@ const fireMutation = async ({
|
||||
const res = await client({
|
||||
method: 'post',
|
||||
instance: 'local',
|
||||
endpoint: `polls/${id}/votes`,
|
||||
url: `polls/${id}/votes`,
|
||||
body: formData
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user