fix feishu reauth for online docs
This commit is contained in:
@@ -20,6 +20,7 @@ export async function POST(request: Request) {
|
||||
|
||||
const body = (await request.json().catch(() => ({}))) as {
|
||||
action?: unknown;
|
||||
force?: unknown;
|
||||
};
|
||||
const action = typeof body.action === "string" ? body.action : "login";
|
||||
const endpoint =
|
||||
@@ -30,7 +31,10 @@ export async function POST(request: Request) {
|
||||
const response = await fetch(`${CLAW_API_URL}${endpoint}`, {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({ account_id: account.id }),
|
||||
body: JSON.stringify({
|
||||
account_id: account.id,
|
||||
...(action !== "logout" && body.force === true ? { force: true } : {}),
|
||||
}),
|
||||
cache: "no-store",
|
||||
});
|
||||
return proxyResponse(response);
|
||||
|
||||
Reference in New Issue
Block a user