aboutsummaryrefslogtreecommitdiff
path: root/apps/proxy/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-03-27 09:47:55 +0000
committerFuwn <[email protected]>2026-03-27 09:47:55 +0000
commit9af58779cf104b8f5552bac81fe8b5f8eee2330d (patch)
treed07e3ef4a3c3b1d0947e6c9121567ee1dcf8fd4f /apps/proxy/src
parentfix(api): keep preferences publicly readable (diff)
downloaddue.moe-9af58779cf104b8f5552bac81fe8b5f8eee2330d.tar.xz
due.moe-9af58779cf104b8f5552bac81fe8b5f8eee2330d.zip
style(ci): format and tidy proxy files
Diffstat (limited to 'apps/proxy/src')
-rw-r--r--apps/proxy/src/index.js23
1 files changed, 15 insertions, 8 deletions
diff --git a/apps/proxy/src/index.js b/apps/proxy/src/index.js
index f90adfa7..80d87b1b 100644
--- a/apps/proxy/src/index.js
+++ b/apps/proxy/src/index.js
@@ -4,8 +4,8 @@ import {
getMangadexFailureRowsByAniListIds,
getMangadexRowsByAniListIds,
hasSupabaseConfig,
- upsertMangadexRows,
upsertMangadexFailureRows,
+ upsertMangadexRows,
} from "./supabase.js";
const DEFAULT_ALLOWED_ORIGIN = "https://due.moe";
@@ -144,7 +144,10 @@ const parseMangaPayload = async (request) => {
};
const bootstrapRetryMinutes = (env) => {
- const minutes = Number.parseInt(env.MANGADEX_BOOTSTRAP_RETRY_MINUTES || "", 10);
+ const minutes = Number.parseInt(
+ env.MANGADEX_BOOTSTRAP_RETRY_MINUTES || "",
+ 10,
+ );
return Number.isFinite(minutes) && minutes > 0
? minutes
@@ -152,7 +155,10 @@ const bootstrapRetryMinutes = (env) => {
};
const pendingRetryMs = (env) => {
- const milliseconds = Number.parseInt(env.MANGA_CHAPTER_COUNTS_RETRY_MS || "", 10);
+ const milliseconds = Number.parseInt(
+ env.MANGA_CHAPTER_COUNTS_RETRY_MS || "",
+ 10,
+ );
return Number.isFinite(milliseconds) && milliseconds > 0
? milliseconds
@@ -248,7 +254,11 @@ const handleMangaChapterCounts = async (request, env, ctx) => {
},
]),
);
- const pending = [...new Set([...pendingRows, ...queueableRows].map((entry) => entry.anilistId))];
+ const pending = [
+ ...new Set(
+ [...pendingRows, ...queueableRows].map((entry) => entry.anilistId),
+ ),
+ ];
return jsonResponse(request, {
data,
@@ -292,10 +302,7 @@ export default {
if (request.method === "OPTIONS") return handleOptions(request);
- if (
- url.pathname === "/manga/chapter-counts" &&
- request.method === "POST"
- )
+ if (url.pathname === "/manga/chapter-counts" && request.method === "POST")
return handleMangaChapterCounts(request, env, ctx);
if (url.pathname === "/manga/sync" && request.method === "POST")