Add password reset localization and chat configuration

- Implemented German and English localization for password reset functionality.
- Added WebSocket URL resolution logic in chat services to support various environments and configurations.
- Created centralized chat configuration for event keys and payload mappings.
- Developed RoomsView component for admin chat room management, including create, edit, and delete functionalities.
This commit is contained in:
Torsten Schulz (local)
2025-08-18 07:44:56 +02:00
parent 23f698d8fd
commit 19ee6ba0a1
50 changed files with 3117 additions and 359 deletions

View File

@@ -308,7 +308,20 @@ class AdminService {
}
async getRooms() {
// Only return necessary fields to the frontend
return await Room.findAll({
attributes: [
'id',
'title',
'roomTypeId',
'isPublic',
'genderRestrictionId',
'minAge',
'maxAge',
'friendsOfOwnerOnly',
'requiredUserRightId',
'password' // only if needed for editing, otherwise remove
],
include: [
{ model: RoomType, as: 'roomType' },
{ model: UserParamValue, as: 'genderRestriction' },
@@ -316,6 +329,13 @@ class AdminService {
});
}
async updateRoom(id, data) {
const room = await Room.findByPk(id);
if (!room) throw new Error('Room not found');
await room.update(data);
return room;
}
async createRoom(data) {
return await Room.create(data);
}