From 26e375092a14513f469d7d776e070c15bcb76880 Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Sun, 5 Jun 2022 23:43:19 +0700 Subject: [PATCH] fix(nhentai): staged changes --- src/controller/nhentai/nhentaiGet.ts | 2 +- src/controller/nhentai/nhentaiRelated.ts | 2 +- src/controller/nhentai/nhentaiSearch.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controller/nhentai/nhentaiGet.ts b/src/controller/nhentai/nhentaiGet.ts index 433584d..e1093e6 100644 --- a/src/controller/nhentai/nhentaiGet.ts +++ b/src/controller/nhentai/nhentaiGet.ts @@ -10,7 +10,7 @@ export async function getNhentai(req: any, res: any) { if (isNaN(book)) throw Error("Value must be number"); let actualAPI; - if (!await mock(c.NHENTAI)) actualAPI = c.NHENTAI_IP; + if (!await mock(c.NHENTAI)) actualAPI = c.NHENTAI_IP_2; const url = `${actualAPI}/api/gallery/${book}`; const data = await scrapeContent(url); diff --git a/src/controller/nhentai/nhentaiRelated.ts b/src/controller/nhentai/nhentaiRelated.ts index 6a54174..990bb69 100644 --- a/src/controller/nhentai/nhentaiRelated.ts +++ b/src/controller/nhentai/nhentaiRelated.ts @@ -10,7 +10,7 @@ export async function relatedNhentai(req: any, res: any) { if (isNaN(book)) throw Error("Value must be number"); let actualAPI; - if (!await mock(c.NHENTAI)) actualAPI = c.NHENTAI_IP; + if (!await mock(c.NHENTAI)) actualAPI = c.NHENTAI_IP_2; const url = `${actualAPI}/api/gallery/${book}/related`; const data = await scrapeContent(url); diff --git a/src/controller/nhentai/nhentaiSearch.ts b/src/controller/nhentai/nhentaiSearch.ts index 26ca7bb..1405c3b 100644 --- a/src/controller/nhentai/nhentaiSearch.ts +++ b/src/controller/nhentai/nhentaiSearch.ts @@ -13,7 +13,7 @@ export async function searchNhentai(req: any, res: any) { if (!sorting.includes(sort)) throw Error("Invalid short: " + sorting.join(", ")); let actualAPI; - if (!await mock(c.NHENTAI)) actualAPI = c.NHENTAI_IP; + if (!await mock(c.NHENTAI)) actualAPI = c.NHENTAI_IP_2; const url = `${actualAPI}/api/galleries/search?query=${key}&sort=${sort}&page=${page}`; const data = await scrapeContent(url);