All checks were successful
Deploy to production / deploy (push) Successful in 1m57s
- Added reportChatIncident method in ChatController to handle reporting of chat incidents. - Introduced a new API route for reporting incidents in chatRouter. - Implemented chatService methods to ensure the chat report table is created and to handle incident data storage. - Enhanced frontend components to allow users to report incidents in both multi and random chat dialogs. - Updated internationalization files to include new strings for reporting functionality in multiple languages.
26 lines
799 B
JavaScript
26 lines
799 B
JavaScript
import apiClient from "@/utils/axios.js";
|
|
|
|
export const fetchPublicRooms = async (options = {}) => {
|
|
const response = await apiClient.get("/api/chat/rooms", { params: options });
|
|
return response.data; // expecting array of { id, title, ... }
|
|
};
|
|
|
|
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}`);
|
|
};
|
|
|
|
export const reportChatIncident = async (payload) => {
|
|
const response = await apiClient.post("/api/chat/report", payload);
|
|
return response.data;
|
|
};
|