Skip to content

Commit

Permalink
feat(route): update fanbox (#17065)
Browse files Browse the repository at this point in the history
  • Loading branch information
zipated authored Oct 9, 2024
1 parent 347f84c commit 6a2cff9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/routes/fanbox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function handler(ctx: Context): Promise<Data> {
}

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,
Expand Down
6 changes: 1 addition & 5 deletions lib/routes/fanbox/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ export interface UserInfoResponse {
}

export interface PostListResponse {
body: {
items: PostItem[];
nextUrl: string | null;
};
body: PostItem[];
}

export interface PostDetailResponse {
Expand Down Expand Up @@ -88,7 +85,6 @@ interface BasicPost {
userId: string;
};
}[];
nextUrl: string | null;
};
coverImageUrl: string | null;
creatorId: string;
Expand Down

0 comments on commit 6a2cff9

Please sign in to comment.