mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-12 23:46:22 +00:00
refactor: standardize paths in require()'s
This commit is contained in:
parent
79631ce624
commit
a356ce5ad3
@ -2,8 +2,8 @@ const path = require('path')
|
||||
const paths = require('./pathsController')
|
||||
const ClientError = require('./utils/ClientError')
|
||||
const ServerError = require('./utils/ServerError')
|
||||
const config = require('../config')
|
||||
const logger = require('../logger')
|
||||
const config = require('./../config')
|
||||
const logger = require('./../logger')
|
||||
|
||||
const self = {
|
||||
errorPagesCodes: Object.keys(config.errorPages)
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
const contentDisposition = require('content-disposition')
|
||||
const SimpleDataStore = require('../utils/SimpleDataStore')
|
||||
const paths = require('../pathsController')
|
||||
const utils = require('../utilsController')
|
||||
const logger = require('../../logger')
|
||||
const SimpleDataStore = require('./../utils/SimpleDataStore')
|
||||
const paths = require('./../pathsController')
|
||||
const utils = require('./../utilsController')
|
||||
const logger = require('./../../logger')
|
||||
|
||||
class ServeStatic {
|
||||
directory
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { Router } = require('hyper-express')
|
||||
const routes = new Router()
|
||||
const path = require('path')
|
||||
const errors = require('../controllers/errorsController')
|
||||
const errors = require('./../controllers/errorsController')
|
||||
const utils = require('./../controllers/utilsController')
|
||||
const config = require('./../config')
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { Router } = require('hyper-express')
|
||||
const routes = new Router()
|
||||
const utils = require('../controllers/utilsController')
|
||||
const config = require('../config')
|
||||
const utils = require('./../controllers/utilsController')
|
||||
const config = require('./../config')
|
||||
|
||||
routes.get('/file/:identifier', async (req, res) => {
|
||||
// Uploads identifiers parsing, etc., are strictly handled by client-side JS at src/js/file.js
|
||||
|
@ -1,6 +1,6 @@
|
||||
const path = require('path')
|
||||
const paths = require('../controllers/pathsController')
|
||||
const utils = require('../controllers/utilsController')
|
||||
const paths = require('./../controllers/pathsController')
|
||||
const utils = require('./../controllers/utilsController')
|
||||
|
||||
const self = {
|
||||
getFiles: async directory => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
const utils = require('../controllers/utilsController')
|
||||
const utils = require('./../controllers/utilsController')
|
||||
|
||||
;(async () => {
|
||||
const location = process.argv[1].replace(process.cwd() + '/', '')
|
||||
|
@ -1,8 +1,8 @@
|
||||
const blake3 = require('blake3')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const paths = require('../controllers/pathsController')
|
||||
const utils = require('../controllers/utilsController')
|
||||
const paths = require('./../controllers/pathsController')
|
||||
const utils = require('./../controllers/utilsController')
|
||||
|
||||
;(async () => {
|
||||
const location = process.argv[1].replace(process.cwd() + '/', '')
|
||||
|
@ -1,6 +1,6 @@
|
||||
const path = require('path')
|
||||
const paths = require('../controllers/pathsController')
|
||||
const utils = require('../controllers/utilsController')
|
||||
const paths = require('./../controllers/pathsController')
|
||||
const utils = require('./../controllers/utilsController')
|
||||
|
||||
const self = {
|
||||
mode: null,
|
||||
|
Loading…
Reference in New Issue
Block a user