request: rename verifyRequest to normalizeRequest
This commit is contained in:
parent
96d7075eed
commit
b13919d89b
2 changed files with 3 additions and 3 deletions
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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)),
|
||||
|
|
Loading…
Reference in a new issue