This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 605
/
group.route.js
44 lines (41 loc) · 1.62 KB
/
group.route.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const express = require('express')
const controller = require('../controllers/group.controller')
const keyVerify = require('../middlewares/keyCheck')
const loginVerify = require('../middlewares/loginCheck')
const router = express.Router()
router.route('/create').post(keyVerify, loginVerify, controller.create)
router.route('/listall').get(keyVerify, loginVerify, controller.listAll)
router.route('/leave').get(keyVerify, loginVerify, controller.leaveGroup)
router
.route('/inviteuser')
.post(keyVerify, loginVerify, controller.addNewParticipant)
router.route('/makeadmin').post(keyVerify, loginVerify, controller.makeAdmin)
router
.route('/demoteadmin')
.post(keyVerify, loginVerify, controller.demoteAdmin)
router
.route('/getinvitecode')
.get(keyVerify, loginVerify, controller.getInviteCodeGroup)
router
.route('/getinstanceinvitecode')
.get(keyVerify, loginVerify, controller.getInstanceInviteCodeGroup)
router
.route('/getallgroups')
.get(keyVerify, loginVerify, controller.getAllGroups)
router
.route('/participantsupdate')
.post(keyVerify, loginVerify, controller.groupParticipantsUpdate)
router
.route('/settingsupdate')
.post(keyVerify, loginVerify, controller.groupSettingUpdate)
router
.route('/updatesubject')
.post(keyVerify, loginVerify, controller.groupUpdateSubject)
router
.route('/updatedescription')
.post(keyVerify, loginVerify, controller.groupUpdateDescription)
router
.route('/inviteinfo')
.post(keyVerify, loginVerify, controller.groupInviteInfo)
router.route('/groupjoin').post(keyVerify, loginVerify, controller.groupJoin)
module.exports = router