mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-07 14:28:09 +03:00
fix: json is the past
This commit is contained in:
@@ -39,14 +39,14 @@ export function CreateKaiReauthFunction(
|
||||
const url = `${KaiTypeToBaseURL(kaiType)}/oauth/token`;
|
||||
|
||||
res = await fetch(url, {
|
||||
body: JSON.stringify({
|
||||
body: new URLSearchParams({
|
||||
refresh_token: authDoc.refreshToken,
|
||||
grant_type: "refresh_token",
|
||||
client_secret: CLIENT_SECRET,
|
||||
client_id: CLIENT_ID,
|
||||
}),
|
||||
}).toString(),
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||
});
|
||||
} catch (err) {
|
||||
logger.error(`Unexpected error while fetching reauth?`, { res, err });
|
||||
|
||||
Reference in New Issue
Block a user