1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 22:59:28 +00:00

Fixed validation middlewares so they they run against all HTTP request types

This commit is contained in:
2022-03-21 10:37:55 +00:00
parent a7808458f8
commit bd662661ee
3 changed files with 5 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ router.post('/class/add', async (req, res) => {
res.redirect(`/admin/class/${c.id}/members`);
});
router.get(/class\/(.{36})(\/.*)?/, async (req, res, next) => {
router.all(/class\/(.{36})(\/.*)?/, async (req, res, next) => {
let c;
try {
c = await new Class(req.params[0]);