fix(route/kemono): fix items parsing logic (#18291)
This commit is contained in:
parent
4fc15dcd02
commit
deeed2068b
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue