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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user