Skip to content

Commit

Permalink
fix: 🐛 修复 koharu 改版导致的失效
Browse files Browse the repository at this point in the history
  • Loading branch information
hymbz committed Jul 28, 2024
1 parent 67d4da9 commit 7e04bc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,9 @@ try {
`https://api.koharu.to/books/detail/${galleryId}/${galleryKey}`,
{ fetch: true, responseType: 'json' },
);
const [{ id, public_key }] = Object.values(
const [[w, { id, public_key }]] = Object.entries(
detailRes.response.data,
).sort((a, b) => b.size - a.size);
).sort(([, a], [, b]) => b.size - a.size);
const { created_at, updated_at } = detailRes.response;

type DataRes = {
Expand All @@ -659,7 +659,7 @@ try {
const dataRes = await main.request<DataRes>(
`https://api.koharu.to/books/data/${galleryId}/${galleryKey}/${
id
}/${public_key}?v=${updated_at ?? created_at}`,
}/${public_key}?v=${updated_at ?? created_at}&w=${w}`,
{ fetch: true, responseType: 'json' },
);
const { base, entries } = dataRes.response;
Expand Down

0 comments on commit 7e04bc1

Please sign in to comment.