various refactors

This commit is contained in:
AlecM33
2023-08-13 17:51:41 -04:00
parent 29431565b4
commit 0b7dd9f4d7
34 changed files with 1097 additions and 1164 deletions

View File

@@ -3,13 +3,13 @@ const router = express.Router();
const debugMode = Array.from(process.argv.map((arg) => arg.trim().toLowerCase())).includes('debug');
const logger = require('../modules/Logger')(debugMode);
const eventManager = (require('../modules/singletons/EventManager.js')).instance;
const globals = require('../config/globals.js');
const cors = require('cors');
const { CORS_OPTIONS, CONTENT_TYPE_VALIDATOR } = require('../config/globals');
router.use(cors(globals.CORS));
router.use(cors(CORS_OPTIONS));
router.post('/sockets/broadcast', (req, res, next) => {
globals.CONTENT_TYPE_VALIDATOR(req, res, next);
CONTENT_TYPE_VALIDATOR(req, res, next);
});
// TODO: implement client-side display of this message.