From 73b28bb73facf38744e26645ef89a327df2c5611 Mon Sep 17 00:00:00 2001 From: notashelf Date: Mon, 4 Apr 2022 20:05:59 +0300 Subject: [PATCH] rename variables for readibility --- src/Pager.ts | 6 +++--- src/routes/route.admin.ts | 2 +- src/routes/route.public.ts | 2 +- src/routes/route.user.ts | 2 +- src/utils/assJSONStructure.ts | 6 +++--- src/utils/utils.ts | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Pager.ts b/src/Pager.ts index 501e822..c453b4f 100644 --- a/src/Pager.ts +++ b/src/Pager.ts @@ -1,7 +1,7 @@ import { Response } from "express" import { parseAuthFile, parseDataFile } from "./utils/assJSONStructure" import { RenderOptions } from "./typings/Pager" -import { ASSDOMAIN, ASSSECURE, STAFF_IDS } from "./CONSTANTS" +import { ASS_DOMAIN, ASS_SECURE, STAFF_IDS } from "./constants" import { convertTimestamp, formatSize } from "./utils/utils" import { ASSUser, ASSItem } from "./typings/ASSTypes" import { IExtendedRequest } from "./typings/express-ext" @@ -120,8 +120,8 @@ export class Pager { */ const baseData = { - assDomain: ASSDOMAIN, - assSecure: ASSSECURE, + assDomain: ASS_DOMAIN, + assSecure: ASS_SECURE, user: req.user, totalSize, totalUsers, diff --git a/src/routes/route.admin.ts b/src/routes/route.admin.ts index 294d6b3..6674c5d 100644 --- a/src/routes/route.admin.ts +++ b/src/routes/route.admin.ts @@ -1,6 +1,6 @@ import { Request, Response, Router } from "express" import { authCheck, adminCheck, wrap } from "../utils/utils" -import { TEMPLATE } from "../CONSTANTS" +import { TEMPLATE } from "../constants" import { Pager } from "../Pager" export const adminRoutes = (app: Router) => { diff --git a/src/routes/route.public.ts b/src/routes/route.public.ts index 79ad557..cca7765 100644 --- a/src/routes/route.public.ts +++ b/src/routes/route.public.ts @@ -1,5 +1,5 @@ import { Request, Response, Router } from "express" -import { TEMPLATE } from "../CONSTANTS" +import { TEMPLATE } from "../constants" import { Pager } from "../Pager" export const publicRoutes = (app: Router) => { diff --git a/src/routes/route.user.ts b/src/routes/route.user.ts index 8ee673a..97b1eaf 100644 --- a/src/routes/route.user.ts +++ b/src/routes/route.user.ts @@ -1,6 +1,6 @@ import { Request, Response, Router } from "express" import { adminCheck, authCheck, wrap } from "../utils/utils" -import { TEMPLATE } from "../CONSTANTS" +import { TEMPLATE } from "../constants" import { Pager } from "../Pager" import { parseAuthFile } from "../utils/assJSONStructure" diff --git a/src/utils/assJSONStructure.ts b/src/utils/assJSONStructure.ts index 322fc23..3f95cc4 100644 --- a/src/utils/assJSONStructure.ts +++ b/src/utils/assJSONStructure.ts @@ -1,10 +1,10 @@ -import { DICK_SUBMODULE, ASSLOCATION } from "../CONSTANTS" +import { DICK_SUBMODULE, ASS_LOCATION } from "../constants" import fs from "fs" import path from "path" import { ASSItem } from "typings/ASSTypes" - let DATA_FILE_PATH = path.resolve(`${ASSLOCATION}/data.json`) - let AUTH_FILE_PATH = path.resolve(`${ASSLOCATION}/auth.json`) + let DATA_FILE_PATH = path.resolve(`${ASS_LOCATION}/data.json`) + let AUTH_FILE_PATH = path.resolve(`${ASS_LOCATION}/auth.json`) if (DICK_SUBMODULE !== false) { DATA_FILE_PATH = path.resolve(`data.json`) AUTH_FILE_PATH = path.resolve(`auth.json`) diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 9584cbd..25e3d87 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -1,5 +1,5 @@ import { Log } from "@callmekory/logger" -import { STAFF_IDS } from "../CONSTANTS" +import { STAFF_IDS } from "../constants" import { Response, NextFunction } from "express" import { join, normalize } from "path" import { IExtendedRequest } from "../typings/express-ext"