feat(web): /api/box status, lifecycle, tree, file, terminal-token routes

This commit is contained in:
Gabriel Brown
2026-07-11 12:36:56 -04:00
parent 11e93ade5f
commit 27019dc1d3
5 changed files with 57 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { proxyBox, withBox } from '@/lib/agent-worker-proxy';
export const GET = async (request: Request) =>
await withBox(async (username) => {
const url = new URL(request.url);
return await proxyBox(
username,
'file',
{ method: 'GET' },
new URLSearchParams({ path: url.searchParams.get('path') ?? '' }),
);
});
export const PUT = async (request: Request) =>
await withBox(
async (username) =>
await proxyBox(username, 'file', {
method: 'PUT',
body: await request.text(),
}),
);