3 var express = require('express');
4 var controller = require('./voice_voicemail.controller');
5 var auth = require('../../auth/auth.service');
7 var router = express.Router();
9 router.get('/', auth.isAuthenticated(), controller.index);
10 router.get('/:uniqueid', auth.isAuthenticated(), controller.show);
11 router.get('/:uniqueid/messages', auth.isAuthenticated(), controller.getMessages);
12 router.get('/messages/:id/download', auth.isAuthenticated(), controller.downloadMessage);
13 router.post('/', auth.isAuthenticated(), controller.create);
14 router.post('/validate', auth.isAuthenticated(), controller.mailboxValidation);
15 router.put('/:uniqueid', auth.isAuthenticated(), controller.update);
16 router.patch('/:id', auth.isAuthenticated(), controller.update);
17 router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
18 router.delete('/:uniqueid', auth.isAuthenticated(), controller.destroy);
19 router.delete('/messages/:id/delete', auth.isAuthenticated(), controller.destroyMessage);
21 module.exports = router;