feat(chat): add chat room management functionality
- Created new chat schema in the database. - Implemented chat room model with necessary fields (title, ownerId, roomTypeId, etc.). - Added room type model and rights model for chat functionality. - Developed API endpoints for managing chat rooms, including create, edit, and delete operations. - Integrated chat room management into the admin interface with a dedicated view and dialog for room creation/editing. - Added internationalization support for chat room management UI. - Implemented autocomplete for victim selection in underground activities. - Enhanced the underground view with new activity types and political target selection.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
import { Router } from 'express';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
import AdminController from '../controllers/adminController.js';
|
||||
@@ -5,6 +6,14 @@ import AdminController from '../controllers/adminController.js';
|
||||
const router = Router();
|
||||
const adminController = new AdminController();
|
||||
|
||||
// --- Chat Room Admin ---
|
||||
router.get('/chat/room-types', authenticate, adminController.getRoomTypes);
|
||||
router.get('/chat/gender-restrictions', authenticate, adminController.getGenderRestrictions);
|
||||
router.get('/chat/user-rights', authenticate, adminController.getUserRights);
|
||||
router.get('/chat/rooms', authenticate, adminController.getRooms);
|
||||
router.post('/chat/rooms', authenticate, adminController.createRoom);
|
||||
router.delete('/chat/rooms/:id', authenticate, adminController.deleteRoom);
|
||||
|
||||
router.get('/interests/open', authenticate, adminController.getOpenInterests);
|
||||
router.post('/interest', authenticate, adminController.changeInterest);
|
||||
router.post('/interest/translation', authenticate, adminController.changeTranslation);
|
||||
|
||||
@@ -41,7 +41,7 @@ router.get('/family/gifts', falukantController.getGifts);
|
||||
router.get('/family/children', falukantController.getChildren);
|
||||
router.post('/family/gift', falukantController.sendGift);
|
||||
router.get('/family', falukantController.getFamily);
|
||||
router.get('/nobility/titels', falukantController.getTitelsOfNobility);
|
||||
router.get('/nobility/titels', falukantController.getTitlesOfNobility);
|
||||
router.get('/houses/types', falukantController.getHouseTypes);
|
||||
router.get('/houses/buyable', falukantController.getBuyableHouses);
|
||||
router.get('/houses', falukantController.getUserHouse);
|
||||
@@ -71,5 +71,9 @@ router.post('/politics/open', falukantController.applyForElections);
|
||||
router.get('/cities', falukantController.getRegions);
|
||||
router.get('/underground/types', falukantController.getUndergroundTypes);
|
||||
router.get('/notifications', falukantController.getNotifications);
|
||||
router.get('/underground/targets', falukantController.getUndergroundTargets);
|
||||
router.post('/underground/activities', falukantController.createUndergroundActivity);
|
||||
router.get('/users/search', falukantController.searchUsers);
|
||||
router.get('/underground/attacks', falukantController.getUndergroundAttacks);
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user