Built motion from commit 06df96e on branch develop.
[motion.git] / server / api / chat_room / index.js
1 'use strict';
2
3 var express = require('express');
4 var controller = require('./chat_room.controller');
5 var auth = require('../../auth/auth.service');
6 var router = express.Router();
7
8 router.get('/', controller.index);
9 router.get('/me', auth.isAuthenticated(), controller.me);
10 router.get('/users', auth.isAuthenticated(), controller.getRoomByUsers);
11 router.get('/groups', auth.isAuthenticated(), controller.getRoomGroups);
12 router.get('/type/:type', auth.isAuthenticated(), controller.getRoomByType);
13 router.get('/:id', controller.show);
14 router.post('/', auth.isAuthenticated(), controller.create);
15 router.put('/:id', controller.update);
16 router.put('/:id/users', controller.updateUsers);
17 router.patch('/:id', controller.update);
18 router.delete('/:id', controller.destroy);
19
20 module.exports = router;