From 9af58779cf104b8f5552bac81fe8b5f8eee2330d Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 27 Mar 2026 09:47:55 +0000 Subject: style(ci): format and tidy proxy files --- apps/proxy/src/index.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'apps/proxy') 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") -- cgit v1.2.3