From b13919d89b896b969ce53b75e9013be0cd39dd3d Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Wed, 15 May 2024 17:03:33 +0000 Subject: [PATCH] request: rename verifyRequest to normalizeRequest --- src/core/api.js | 4 ++-- src/modules/processing/request.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/api.js b/src/core/api.js index c4087e0b..070ff3d6 100644 --- a/src/core/api.js +++ b/src/core/api.js @@ -7,7 +7,7 @@ const ipSalt = randomBytes(64).toString('hex'); import { env, version } from "../modules/config.js"; import match from "../modules/processing/match.js"; import { languageCode } from "../modules/sub/utils.js"; -import { createResponse, verifyRequest, getIP } from "../modules/processing/request.js"; +import { createResponse, normalizeRequest, getIP } from "../modules/processing/request.js"; import { Bright, Cyan } from "../modules/sub/consoleText.js"; import stream from "../modules/stream/stream.js"; import loc from "../localization/manager.js"; @@ -113,7 +113,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) { } request.dubLang = request.dubLang ? lang : false; - const normalizedRequest = verifyRequest(request); + const normalizedRequest = normalizeRequest(request); if (!normalizedRequest) { return fail('ErrorCantProcess'); } diff --git a/src/modules/processing/request.js b/src/modules/processing/request.js index 1b184bac..f2f58c65 100644 --- a/src/modules/processing/request.js +++ b/src/modules/processing/request.js @@ -101,7 +101,7 @@ export function createResponse(responseType, responseData) { } } -export function verifyRequest(request) { +export function normalizeRequest(request) { try { let template = { url: normalizeURL(decodeURIComponent(request.url)),