mirror of https://github.com/tooot-app/app
Fix #597
This commit is contained in:
parent
047464a9c1
commit
852095f5cf
|
@ -44,7 +44,7 @@ const apiGeneral = async <T = unknown>({
|
||||||
...userAgent,
|
...userAgent,
|
||||||
...headers
|
...headers
|
||||||
},
|
},
|
||||||
...(body && { data: body })
|
...((body as (FormData & { _parts: [][] }) | undefined)?._parts.length && { data: body })
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
let links: {
|
let links: {
|
||||||
|
|
|
@ -64,7 +64,7 @@ const apiInstance = async <T = unknown>({
|
||||||
Authorization: `Bearer ${token}`
|
Authorization: `Bearer ${token}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
...(body && { data: body }),
|
...((body as (FormData & { _parts: [][] }) | undefined)?._parts.length && { data: body }),
|
||||||
...extras
|
...extras
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
|
|
@ -47,7 +47,7 @@ const apiTooot = async <T = unknown>({
|
||||||
...userAgent,
|
...userAgent,
|
||||||
...headers
|
...headers
|
||||||
},
|
},
|
||||||
...(body && { data: body })
|
...((body as (FormData & { _parts: [][] }) | undefined)?._parts.length && { data: body })
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
|
|
Loading…
Reference in New Issue