rename variables for readibility

pull/2/head
notashelf 3 years ago
parent e4f841e9b0
commit 73b28bb73f
No known key found for this signature in database
GPG Key ID: C800E8AA68FA205E

@ -1,7 +1,7 @@
import { Response } from "express" import { Response } from "express"
import { parseAuthFile, parseDataFile } from "./utils/assJSONStructure" import { parseAuthFile, parseDataFile } from "./utils/assJSONStructure"
import { RenderOptions } from "./typings/Pager" 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 { convertTimestamp, formatSize } from "./utils/utils"
import { ASSUser, ASSItem } from "./typings/ASSTypes" import { ASSUser, ASSItem } from "./typings/ASSTypes"
import { IExtendedRequest } from "./typings/express-ext" import { IExtendedRequest } from "./typings/express-ext"
@ -120,8 +120,8 @@ export class Pager {
*/ */
const baseData = { const baseData = {
assDomain: ASSDOMAIN, assDomain: ASS_DOMAIN,
assSecure: ASSSECURE, assSecure: ASS_SECURE,
user: req.user, user: req.user,
totalSize, totalSize,
totalUsers, totalUsers,

@ -1,6 +1,6 @@
import { Request, Response, Router } from "express" import { Request, Response, Router } from "express"
import { authCheck, adminCheck, wrap } from "../utils/utils" import { authCheck, adminCheck, wrap } from "../utils/utils"
import { TEMPLATE } from "../CONSTANTS" import { TEMPLATE } from "../constants"
import { Pager } from "../Pager" import { Pager } from "../Pager"
export const adminRoutes = (app: Router) => { export const adminRoutes = (app: Router) => {

@ -1,5 +1,5 @@
import { Request, Response, Router } from "express" import { Request, Response, Router } from "express"
import { TEMPLATE } from "../CONSTANTS" import { TEMPLATE } from "../constants"
import { Pager } from "../Pager" import { Pager } from "../Pager"
export const publicRoutes = (app: Router) => { export const publicRoutes = (app: Router) => {

@ -1,6 +1,6 @@
import { Request, Response, Router } from "express" import { Request, Response, Router } from "express"
import { adminCheck, authCheck, wrap } from "../utils/utils" import { adminCheck, authCheck, wrap } from "../utils/utils"
import { TEMPLATE } from "../CONSTANTS" import { TEMPLATE } from "../constants"
import { Pager } from "../Pager" import { Pager } from "../Pager"
import { parseAuthFile } from "../utils/assJSONStructure" import { parseAuthFile } from "../utils/assJSONStructure"

@ -1,10 +1,10 @@
import { DICK_SUBMODULE, ASSLOCATION } from "../CONSTANTS" import { DICK_SUBMODULE, ASS_LOCATION } from "../constants"
import fs from "fs" import fs from "fs"
import path from "path" import path from "path"
import { ASSItem } from "typings/ASSTypes" import { ASSItem } from "typings/ASSTypes"
let DATA_FILE_PATH = path.resolve(`${ASSLOCATION}/data.json`) let DATA_FILE_PATH = path.resolve(`${ASS_LOCATION}/data.json`)
let AUTH_FILE_PATH = path.resolve(`${ASSLOCATION}/auth.json`) let AUTH_FILE_PATH = path.resolve(`${ASS_LOCATION}/auth.json`)
if (DICK_SUBMODULE !== false) { if (DICK_SUBMODULE !== false) {
DATA_FILE_PATH = path.resolve(`data.json`) DATA_FILE_PATH = path.resolve(`data.json`)
AUTH_FILE_PATH = path.resolve(`auth.json`) AUTH_FILE_PATH = path.resolve(`auth.json`)

@ -1,5 +1,5 @@
import { Log } from "@callmekory/logger" import { Log } from "@callmekory/logger"
import { STAFF_IDS } from "../CONSTANTS" import { STAFF_IDS } from "../constants"
import { Response, NextFunction } from "express" import { Response, NextFunction } from "express"
import { join, normalize } from "path" import { join, normalize } from "path"
import { IExtendedRequest } from "../typings/express-ext" import { IExtendedRequest } from "../typings/express-ext"

Loading…
Cancel
Save