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

Reorder User constructor params

This commit is contained in:
2022-04-07 13:38:41 +00:00
parent 95b1636288
commit ad1a50d4f2
9 changed files with 16 additions and 17 deletions

View File

@@ -212,7 +212,7 @@ router.post('/:id/members/add2', async (req, res) => {
router.get('/:id/:userType(members|teachers)/:userId/remove',
async (req, res) => {
const c = req.class;
const u = await new User(req.db, null, req.params.userId);
const u = await new User(req.db, req.params.userId);
const userType =
req.params.userType === 'teachers' ?
@@ -237,7 +237,7 @@ router.get('/:id/:userType(members|teachers)/:userId/remove',
router.post('/:id/:userType(members|teachers)/:userId/remove',
async (req, res) => {
const c = req.class;
const u = await new User(req.db, null, req.params.userId);
const u = await new User(req.db, req.params.userId);
const userType = req.params.userType;
try {