From 6a2cff9a226bd59d079027d124987687f50a5a7a Mon Sep 17 00:00:00 2001 From: zipated Date: Thu, 10 Oct 2024 00:58:26 +0800 Subject: [PATCH] feat(route): update fanbox (#17065) --- lib/routes/fanbox/index.ts | 2 +- lib/routes/fanbox/types.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/routes/fanbox/index.ts b/lib/routes/fanbox/index.ts index b8e84e31901a92..bb0e46fdf80bb1 100644 --- a/lib/routes/fanbox/index.ts +++ b/lib/routes/fanbox/index.ts @@ -50,7 +50,7 @@ async function handler(ctx: Context): Promise { } const postListResponse = (await ofetch(`https://api.fanbox.cc/post.listCreator?creatorId=${creator}&limit=20`, { headers: getHeaders() })) as PostListResponse; - const items = await Promise.all(postListResponse.body.items.map((i) => parseItem(i))); + const items = await Promise.all(postListResponse.body.map((i) => parseItem(i))); return { title, diff --git a/lib/routes/fanbox/types.ts b/lib/routes/fanbox/types.ts index a3198e9a6276cc..a4a54785f8a4ce 100644 --- a/lib/routes/fanbox/types.ts +++ b/lib/routes/fanbox/types.ts @@ -25,10 +25,7 @@ export interface UserInfoResponse { } export interface PostListResponse { - body: { - items: PostItem[]; - nextUrl: string | null; - }; + body: PostItem[]; } export interface PostDetailResponse { @@ -88,7 +85,6 @@ interface BasicPost { userId: string; }; }[]; - nextUrl: string | null; }; coverImageUrl: string | null; creatorId: string;