作者主页

This commit is contained in:
2025-11-29 21:56:38 +08:00
parent 63ed49e762
commit 674c202264
11 changed files with 279 additions and 37 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ export async function GET(req: NextRequest) {
cover_url: getFileUrl(v.cover_url ?? 'default_cover.png'),
width: v.width ?? null,
height: v.height ?? null,
author: { nickname: v.author.nickname, avatar_url: getFileUrl(v.author.avatar_url ?? '') },
author: { nickname: v.author.nickname, avatar_url: getFileUrl(v.author.avatar_url ?? ''), sec_uid: v.author.sec_uid },
likes: Number(v.digg_count)
})),
...posts.map((p) => ({
@@ -52,7 +52,7 @@ export async function GET(req: NextRequest) {
cover_url: getFileUrl(p.images?.[0]?.url ?? null),
width: p.images?.[0]?.width ?? null,
height: p.images?.[0]?.height ?? null,
author: { nickname: p.author.nickname, avatar_url: getFileUrl(p.author.avatar_url ?? '') },
author: { nickname: p.author.nickname, avatar_url: getFileUrl(p.author.avatar_url ?? ''), sec_uid: p.author.sec_uid },
likes: Number(p.digg_count)
})),
].sort((a, b) => +new Date(b.created_at) - +new Date(a.created_at))