fix: /filter 每页最多50条 (fixed121)
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
This commit is contained in:
1 parent
9d765b9f49
commit
40473955d8
2 files changed
+6
-4
No files matched your search
+2
-2
@@ -35,7 +35,7 @@ RUN find ./src -type f -name "route.ts" -print0 \
|
||||
ENV DOCKER_ENV=true
|
||||
# 海报走站内 /api/image-proxy(浏览器直连豆瓣图被拦导致全裂)
|
||||
ENV NEXT_PUBLIC_IMAGE_PROXY=/api/image-proxy
|
||||
ENV NEXT_PUBLIC_SITE_VERSION=fixed120
|
||||
ENV NEXT_PUBLIC_SITE_VERSION=fixed121
|
||||
ENV NEXT_PUBLIC_ENABLE_REGISTER=true
|
||||
|
||||
# For Docker builds, force dynamic rendering to read runtime environment variables.
|
||||
@@ -56,7 +56,7 @@ ENV HOSTNAME=0.0.0.0
|
||||
ENV PORT=3000
|
||||
ENV DOCKER_ENV=true
|
||||
ENV NEXT_PUBLIC_IMAGE_PROXY=/api/image-proxy
|
||||
ENV NEXT_PUBLIC_SITE_VERSION=fixed120
|
||||
ENV NEXT_PUBLIC_SITE_VERSION=fixed121
|
||||
ENV NEXT_PUBLIC_ENABLE_REGISTER=true
|
||||
|
||||
# 从构建器中复制 standalone 输出
|
||||
|
||||
@@ -166,7 +166,7 @@ async function browseSite(
|
||||
const batch = Math.min(Math.max(opts.batch || BATCH_DEFAULT, 1), 6);
|
||||
const want = 24;
|
||||
const maxPages = 30;
|
||||
const list: any[] = [];
|
||||
let list: any[] = [];
|
||||
let hasMore = true;
|
||||
let fetched = 0;
|
||||
while (hasMore && fetched < maxPages) {
|
||||
@@ -191,6 +191,7 @@ async function browseSite(
|
||||
});
|
||||
if (list.length >= want || !hasMore) break;
|
||||
}
|
||||
list = list.slice(0, 50);
|
||||
return { list, next_pg: pg, has_more: hasMore };
|
||||
}
|
||||
|
||||
@@ -222,7 +223,7 @@ async function browseAll(
|
||||
)
|
||||
);
|
||||
const seen = new Set<string>();
|
||||
const list: any[] = [];
|
||||
let list: any[] = [];
|
||||
let hasMore = false;
|
||||
let nextPg = Infinity;
|
||||
per.forEach((r) => {
|
||||
@@ -236,6 +237,7 @@ async function browseAll(
|
||||
}
|
||||
});
|
||||
});
|
||||
list = list.slice(0, 50);
|
||||
return { list, next_pg: nextPg === Infinity ? pg + 1 : nextPg, has_more: hasMore };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user