"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.chatRoutes = void 0;
const chatController_js_1 = require("../controllers/chatController.js");
const auth_js_1 = require("../middleware/auth.js");
const validation_js_1 = require("../middleware/validation.js");
const express_1 = require("express");
const router = (0, express_1.Router)();
exports.chatRoutes = router;
router.use(auth_js_1.authenticateToken);
router.get("/chat-rooms", chatController_js_1.ChatController.getChatRooms);
router.post("/chat-rooms", (0, validation_js_1.validate)(validation_js_1.createChatRoomSchema), chatController_js_1.ChatController.createChatRoom);
router.put("/chat-rooms/:roomId", (0, validation_js_1.validate)(validation_js_1.updateChatRoomSchema), chatController_js_1.ChatController.updateChatRoom);
router.delete("/chat-rooms/:roomId", chatController_js_1.ChatController.deleteChatRoom);
router.post("/chat-rooms/:roomId/members", (0, validation_js_1.validate)(validation_js_1.addChatRoomMemberSchema), chatController_js_1.ChatController.addChatRoomMember);
router.delete("/chat-rooms/:roomId/members", (0, validation_js_1.validate)(validation_js_1.removeChatRoomMemberSchema), chatController_js_1.ChatController.removeChatRoomMember);
router.get("/messages/:roomId", chatController_js_1.ChatController.getMessages);
