1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2021-02-11 01:33:31 +01:00
parent a40a645337
commit d1bddc696a
50 changed files with 271 additions and 269 deletions

View File

@ -22,7 +22,7 @@ const queryFunction = ({ queryKey }: { queryKey: QueryKeyRelationship }) => {
params: {
'id[]': id
}
})
}).then(res => res.body)
}
const useRelationshipQuery = ({
@ -61,7 +61,7 @@ const mutationFunction = async (params: MutationVarsRelationship) => {
method: 'post',
instance: 'local',
url: `follow_requests/${params.id}/${params.payload.action}`
})
}).then(res => res.body)
case 'outgoing':
return client<Mastodon.Relationship>({
method: 'post',
@ -69,7 +69,7 @@ const mutationFunction = async (params: MutationVarsRelationship) => {
url: `accounts/${params.id}/${params.payload.state ? 'un' : ''}${
params.payload.action
}`
})
}).then(res => res.body)
}
}