fix feishu reauth for online docs

This commit is contained in:
wuyang6
2026-07-02 14:02:01 +08:00
parent 0007d99763
commit 8eadc25b19
5 changed files with 243 additions and 13 deletions
@@ -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);