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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

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) => {