Unify content under ID-based note dialogs with lightweight previews and Studio proxy
wiki CI and deployment / verify-and-deploy (push) Has been cancelled
studio CI and deployment / verify-and-deploy (push) Has been cancelled

This commit is contained in:
2026-10-25 22:06:05 +08:00
parent 7946aae568
commit b943951bed
44 changed files with 265 additions and 75 deletions
+4
View File
@@ -13,6 +13,10 @@ export async function getPost(slug: string): Promise<Post | null> {
const result = await db().query(`${expand} WHERE p.slug=$1`,[slug]);
return serialize(result.rows,await tags())[0] || null;
}
export async function getPostById(id:string):Promise<Post|null>{
const result=await db().query(`${expand} WHERE p.id=$1`,[id]);
return serialize(result.rows,await tags())[0]||null;
}
export async function feed(options: {kind?: PostKind; path?: string; cursor?: string; q?: string} = {}): Promise<FeedData> {
const allTags=await tags(); const target=options.path ? allTags.find(t=>t.path===options.path) : undefined;
if(options.path&&!target) throw new Error("Tag not found");