add missing valid pve token check to checkAuth
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { Router } from "express";
|
||||
export const router = Router({ mergeParams: true });
|
||||
|
||||
const checkAuth = global.utils.checkAuth;
|
||||
|
||||
/**
|
||||
* GET - get all groups
|
||||
* responses:
|
||||
@@ -8,9 +10,10 @@ export const router = Router({ mergeParams: true });
|
||||
* - 201: {auth: false}
|
||||
*/
|
||||
router.get("/", async (req, res) => {
|
||||
const auth = await checkAuth(req.cookies, res);
|
||||
// check auth
|
||||
const auth = await checkAuth(req.cookies, res);
|
||||
if (!auth) {
|
||||
return;
|
||||
}
|
||||
res.status(200).send(global.userManager.getAllGroups())
|
||||
});
|
||||
res.status(200).send(global.userManager.getAllGroups());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user