1234567891011121314151617 |
- const Joi = require('joi');
- const validate = require('./validate');
- const schemaStartChat = Joi.object({
- id: Joi.string().required(),
- });
- const schemaTypingChat = Joi.object({
- id: Joi.string().required(),
- typing: Joi.boolean().required(),
- });
- module.exports.startChat = (req, _res, next) => {
- return validate(schemaStartChat, req.body, next);
- };
- module.exports.typingChat = (req, _res, next) => {
- return validate(schemaTypingChat, req.body, next);
- };
|