Add chat UI test route and improve user routes structure

This commit is contained in:
Angad Chauhan
2025-06-25 19:32:49 +05:30
parent dfd9a13ce9
commit 5b3129c572
2 changed files with 6 additions and 0 deletions

View File

@@ -38,6 +38,8 @@ router.get('/getAllChatsNotificationCount', (req, res)=> {
router.post('/acceptGroupJoinRequest/:userId', chatController.acceptGroupJoinRequest);
router.post('/rejectGroupJoinRequest/:userId', chatController.rejectGroupJoinRequest);
router.get('/group/:chatId', chatController.getAllRequestsForGroupAdmin);
//export chat route
module.exports = router;

View File

@@ -1,3 +1,4 @@
const path = require('path');
const router = require('express').Router();
const { chatController } = require('../../controller');
const fileUpload = require('../../middlewares/fileUpload');
@@ -46,6 +47,9 @@ router.get('/getChatParticipants/:chatId', chatController.getAllChatParticipants
router.get('/get-all-chat-group-request', chatController.getAllRequestForGroup);
router.post('/share-files', mediaUpload, chatController.shareFilesInChats);
router.post('/send-message', chatController.sendMessage);
router.get('/chat-ui-test', (req, res) => {
res.sendFile(path.join(__dirname, '../../views/chat.html'));
});
// router.get('/getAllChats', (req, res)=> {
// res.send('Chat endpoint');