const express = require('express'); const router = express.Router(); const guard = require('../helpers/guard'); const controllers = require('../controllers/chats'); const validation = require('../validation/chat'); router .get('/', guard, controllers.listChats) .get('/:companionId', guard, controllers.chatById) .post('/', guard, validation.startChat, controllers.startChat) .post('/mute/', guard, controllers.muteChat) .post('/seen/', guard, controllers.seenChat); module.exports = router;