feat(life): add Life Post detail page and endpoint

Implement GET /api/life-posts/:id with moderation and visibility rules
Add /life/:id route and LifePostDetail view
Update feeds and user profiles to link to the new detail page
This commit is contained in:
2026-05-04 09:51:31 +08:00
parent bcff83a512
commit 7ff7e18b94
10 changed files with 1039 additions and 10 deletions

View File

@@ -1030,6 +1030,7 @@ export const api = {
sort: params.sort
})}`
),
lifePost: (id: string | number) => getJson<LifePost>(`/api/life-posts/${id}`),
createLifePost: (payload: LifePostPayload) => sendJson<LifePost>('/api/life-posts', 'POST', payload),
updateLifePost: (id: string | number, payload: LifePostPayload) =>
sendJson<LifePost>(`/api/life-posts/${id}`, 'PUT', payload),