1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Try out new api services

This commit is contained in:
Zhiyuan Zheng
2021-12-06 21:25:09 +01:00
parent 3d481624ad
commit 6c6dc0ce6a
10 changed files with 82 additions and 132 deletions

View File

@ -36,9 +36,9 @@ const queryFunction = async ({ queryKey }: { queryKey: QueryKeyTranslate }) => {
const res = await apiTooot<Translations>({
method: 'get',
service: 'translate',
url: `source/${uriEncoded}/target/${target}`,
headers: { original }
url: '/translate',
headers: { original },
body: { source, target, text }
})
haptics('Light')
return res.body