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)
	.patch('/mute/', guard, controllers.muteChat)
	.patch('/seen/', guard, controllers.seenChat)
	.patch('/typing/', guard, validation.typingChat, controllers.typingChat);

module.exports = router;
