mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-31 02:07:51 +01:00
fix options call settings
This commit is contained in:
@@ -16,6 +16,7 @@ const ADMIN_CORS_OPTIONS = process.env.NODE_ENV?.trim() === 'development'
|
||||
optionsSuccessStatus: 200
|
||||
};
|
||||
router.use(cors(ADMIN_CORS_OPTIONS));
|
||||
router.options('/games/state', cors(ADMIN_CORS_OPTIONS));
|
||||
|
||||
router.post('/sockets/broadcast', (req, res, next) => {
|
||||
CONTENT_TYPE_VALIDATOR(req, res, next);
|
||||
@@ -28,8 +29,6 @@ router.post('/sockets/broadcast', function (req, res) {
|
||||
res.status(201).send('Broadcasted message to all connected sockets: ' + req.body?.message);
|
||||
});
|
||||
|
||||
router.options('/games/state', cors(ADMIN_CORS_OPTIONS));
|
||||
|
||||
router.get('/games/state', async (req, res) => {
|
||||
const gamesArray = [];
|
||||
const keys = await eventManager.publisher.keys('*');
|
||||
|
||||
Reference in New Issue
Block a user