fix(route/kemono): fix items parsing logic (#18291)

This commit is contained in:
AiraNadih
2025-02-06 21:47:27 +08:00
committed by GitHub
parent 4fc15dcd02
commit deeed2068b
+2 -1
View File
@@ -97,7 +97,8 @@ async function handler(ctx) {
const author = isPosts ? '' : await getAuthor(currentUrl, headers);
title = isPosts ? 'Kemono Posts' : `Posts of ${author} from ${source} | Kemono`;
image = isPosts ? `${rootUrl}/favicon.ico` : `https://img.kemono.su/icons/${source}/${id}`;
items = response.data
const responseData = isPosts ? response.data.posts : response.data;
items = responseData
.filter((i) => i.content || i.attachments)
.slice(0, limit)
.map((i) => {