This commit is contained in:
xmflsct 2022-12-21 14:38:09 +01:00
parent 047464a9c1
commit 852095f5cf
3 changed files with 3 additions and 3 deletions

View File

@ -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: {

View File

@ -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 => {

View File

@ -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({