File size: 697 Bytes
057576a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | const express = require('express');
const {
createConversation,
getUserConversations,
getConversation,
getConversationMessages,
updateConversation,
generateInviteLink
} = require('../controllers/conversationController');
const auth = require('../middleware/auth');
const router = express.Router();
router.post('/', auth, createConversation);
router.get('/', auth, getUserConversations);
router.get('/:conversationId', auth, getConversation);
router.get('/:conversationId/messages', auth, getConversationMessages);
router.put('/:conversationId', auth, updateConversation);
router.post('/:conversationId/invite', auth, generateInviteLink);
module.exports = router; |