Files
probably-rendering-one-more…/apps/waterfall-wiki/src/pages/api/guidance/[[...path]].ts
T
codex-bot ad398db781
waterfall-wiki CI and deployment / verify-and-deploy (push) Has been cancelled
studio CI and deployment / verify-and-deploy (push) Successful in 9m15s
Restore PROMPT branding, rename waterfall-wiki, and add system tag workflows
2026-10-27 00:35:59 +08:00

9 lines
534 B
TypeScript

import type {NextApiRequest,NextApiResponse} from 'next';
import {guidanceIndexMarkdown,guidanceMarkdown} from '@/content/skills/guidance';
import {sendMarkdown} from '@/lib/markdown-response';
export default function handler(req:NextApiRequest,res:NextApiResponse){
const parts=Array.isArray(req.query.path)?req.query.path:[];
const text=parts.length===0?guidanceIndexMarkdown(true):parts[0]!=='skills'?null:parts.length===1?guidanceIndexMarkdown():guidanceMarkdown(parts.slice(1).join('/'));
return sendMarkdown(req,res,text);
}