Add functionality for managing user-owned chat rooms: Implement getOwnRooms and deleteOwnRoom methods in ChatController and ChatService, add corresponding API routes in chatRouter, and enhance MultiChatDialog for displaying and deleting owned rooms with localized messages. Update i18n files for new features.
This commit is contained in:
@@ -9,3 +9,12 @@ export const fetchRoomCreateOptions = async () => {
|
||||
const response = await apiClient.get("/api/chat/room-create-options");
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const fetchOwnRooms = async () => {
|
||||
const response = await apiClient.get("/api/chat/my-rooms");
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const deleteOwnRoom = async (roomId) => {
|
||||
await apiClient.delete(`/api/chat/my-rooms/${roomId}`);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user