fix(common): fix

This commit is contained in:
zhangheng
2026-03-16 17:10:13 +08:00
parent 8d3ebbb31d
commit c8b2311488
7 changed files with 97 additions and 76 deletions

View File

@@ -61,21 +61,24 @@ export async function POST(req: any) {
method,
headers: {
"content-type": "application/json",
["Token"]: userData?.refresh_token,
["Refresh-Token"]: userData?.refresh_token,
},
body: JSON.stringify({
token: userData?.refresh_token,
}),
// body: JSON.stringify({
// token: userData?.refresh_token,
// }),
}
} else {
const authorization = `bearer ${userData?.access_token}`
const access_token = `${userData?.access_token}`
fetchOptions = {
method,
headers: {
"content-type": "application/json",
authorization: authorization,
["Token"]: access_token,
["Refresh-Token"]: userData?.refresh_token,
},
}
if (method === "POST" || method === "PUT") {
if (method === "POST" || method === "PUT" || method === "DELETE") {
fetchOptions.body = data
} else {
if (isParamsValid(data)) {