feat: новая функция

This commit is contained in:
2025-10-16 18:44:30 +03:00
parent e0300480e1
commit 927d174f66
33 changed files with 1494 additions and 700 deletions

View File

@@ -44,7 +44,8 @@ const adminChatService = {
async getAdminContacts() {
try {
console.log('[adminChatService] Запрашиваем админские контакты...');
const response = await api.get('/messages/admin/contacts');
// Используем существующий API для получения контактов
const response = await api.get('/users');
console.log('[adminChatService] Получен ответ:', response.data);
return response.data;
} catch (error) {
@@ -60,7 +61,8 @@ const adminChatService = {
*/
async getMessages(adminId) {
try {
const response = await api.get(`/messages/admin/${adminId}`);
// Используем новый API для приватных сообщений
const response = await api.get('/messages/private');
return response.data;
} catch (error) {
console.error('[adminChatService] Ошибка получения сообщений:', error);