mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
First post tested!
This commit is contained in:
@ -6,6 +6,7 @@ const client = async ({
|
||||
method,
|
||||
instance,
|
||||
endpoint,
|
||||
headers,
|
||||
query,
|
||||
body
|
||||
}: {
|
||||
@ -13,6 +14,7 @@ const client = async ({
|
||||
method: 'get' | 'post' | 'delete'
|
||||
instance: 'local' | 'remote'
|
||||
endpoint: string
|
||||
headers?: { [key: string]: string }
|
||||
query?: {
|
||||
[key: string]: string | number | boolean
|
||||
}
|
||||
@ -28,6 +30,7 @@ const client = async ({
|
||||
searchParams: query,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
...headers,
|
||||
...(instance === 'local' && {
|
||||
Authorization: `Bearer ${state.localToken}`
|
||||
})
|
||||
|
Reference in New Issue
Block a user