added new endpoint

This commit is contained in:
2024-10-31 09:00:44 +03:00
parent d4233c72f5
commit 9cd1debd4a
2 changed files with 9 additions and 0 deletions

View File

@@ -9,5 +9,6 @@ const GroupRouter = new Router();
GroupRouter.post('/create/:groupName', tryHandler(auth.authenticate), tryHandler(GroupController.create));
GroupRouter.post('/join/:groupId', tryHandler(auth.authenticate), tryHandler(existance.groupExists), tryHandler(auth.requirePassword), tryHandler(auth.checkGroupPassword), tryHandler(GroupController.join));
GroupRouter.post('/password/:groupId', tryHandler(auth.authenticate), tryHandler(existance.groupExists), tryHandler(auth.authorizeGroupOwner), tryHandler(auth.requirePassword), tryHandler(GroupController.updatePassword));
GroupRouter.get('/byName/:groupName', tryHandler(auth.authenticate), tryHandler(existance.groupExists), tryHandler(GroupController.getByName))
export default GroupRouter;