alpha01 filetti: web app, crossword service and tor batch

This commit is contained in:
2026-06-05 16:22:17 +02:00
parent 47d8957e15
commit 9cb8a5aa8f
29 changed files with 8590 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { readFile } from "node:fs/promises";
import { join } from "node:path";
import { NextResponse } from "next/server";
const RUNTIME_DIR = join(process.cwd(), ".runtime-crosswords");
export async function GET(
_request: Request,
context: { params: Promise<{ id: string }> },
) {
try {
const { id } = await context.params;
const source = await readFile(join(RUNTIME_DIR, `${id}.json`), "utf-8");
return NextResponse.json(JSON.parse(source));
} catch {
return NextResponse.json({ status: "not_found" }, { status: 404 });
}
}