feat: cut over rust web main shell
This commit is contained in:
@@ -35,11 +35,20 @@ export async function POST(request: Request) {
|
||||
|
||||
if (commandName !== PAGE_COMMAND_NAMES.updateTitle) {
|
||||
const upstreamUrl = new URL("/api/tree/commands", request.url);
|
||||
const upstreamHeaders = new Headers({
|
||||
"content-type": "application/json",
|
||||
});
|
||||
const authorization = request.headers.get("authorization");
|
||||
const cookie = request.headers.get("cookie");
|
||||
if (authorization) {
|
||||
upstreamHeaders.set("authorization", authorization);
|
||||
}
|
||||
if (cookie) {
|
||||
upstreamHeaders.set("cookie", cookie);
|
||||
}
|
||||
const response = await fetch(upstreamUrl.toString(), {
|
||||
method: "POST",
|
||||
headers: new Headers({
|
||||
"content-type": "application/json",
|
||||
}),
|
||||
headers: upstreamHeaders,
|
||||
body: JSON.stringify({
|
||||
action: "rename",
|
||||
documentId: normalizedDocumentId,
|
||||
|
||||
Reference in New Issue
Block a user