request: rename verifyRequest to normalizeRequest

This commit is contained in:
dumbmoron 2024-05-15 17:03:33 +00:00
parent 96d7075eed
commit b13919d89b
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -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');
}

View file

@ -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)),