push to maple-street

This commit is contained in:
Tiel Coder
2026-11-20 04:07:02 +00:00
parent 2cec220a24
commit 5adf1cef1f
345 changed files with 86105 additions and 1079 deletions
+4
View File
@@ -1,5 +1,6 @@
import { NextRequest } from "next/server";
import { z } from "zod";
import { gateOrUser } from "@/auth/api";
import { composeSkillName } from "@/domain/skills";
import { dedupeKey } from "@/db/positions";
@@ -39,6 +40,9 @@ const bad = (message: string) =>
* technologyName?, functionId?, functionName? } -> { name, dedupeKey }.
*/
export const POST = async (req: NextRequest) => {
const gate = await gateOrUser("training.author");
if (gate instanceof Response) return gate;
const body = await readBody(req);
if (!body || typeof body !== "object") return bad("invalid body");
const parsed = composeSchema.safeParse(body);