Restore PROMPT branding, rename waterfall-wiki, and add system tag workflows
waterfall-wiki CI and deployment / verify-and-deploy (push) Has been cancelled
studio CI and deployment / verify-and-deploy (push) Successful in 9m15s

This commit is contained in:
2026-10-27 00:35:59 +08:00
parent 0c1ed2d292
commit ad398db781
178 changed files with 585 additions and 365 deletions
@@ -0,0 +1,3 @@
import type {NextApiRequest,NextApiResponse} from 'next';
import {getPost} from '@/lib/library';
export default async function handler(req:NextApiRequest,res:NextApiResponse){if(req.method!=='GET'&&req.method!=='HEAD')return res.status(405).end();try{const post=await getPost(String(req.query.slug||''));if(!post)return res.status(404).end();res.setHeader('Content-Type','text/markdown; charset=utf-8');res.send('# '+post.title+'\n\nNamespace: '+(['image','video','audio'].includes(post.kind)?'File':'Main')+'\n\n'+post.assets.map(a=>a.kind==='text'?a.body:`- ${a.kind}: [${a.filename||a.id}](/api/media/${a.id})`).join('\n\n')+'\n\nCategories: '+post.tags.map(t=>t.name).join(', '));}catch{res.status(503).send('Storage temporarily unavailable');}}