Update API calls to use getUserConversations instead of getConversations

This commit is contained in:
Professional 2025-05-23 18:47:16 +07:00
parent c61a15c8a7
commit 505a4ddfa7
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@
<script setup>
import { useAuth } from '@/auth';
import { ref, watch, onMounted, computed } from 'vue';
import { ref, watch, onMounted, computed, onUnmounted } from 'vue';
import api from '@/services/api';
import { getSocket, connectSocket } from '@/services/socketService';
@ -59,7 +59,7 @@ const fetchConversations = async () => {
if (!isAuthenticated.value) return;
try {
const response = await api.getConversations();
const response = await api.getUserConversations();
conversations.value = response.data;
console.log('[App] Загружено диалогов для счетчика уведомлений:', conversations.value.length);
} catch (err) {

View File

@ -136,7 +136,7 @@ const fetchConversations = async () => {
loading.value = true;
error.value = '';
try {
const response = await api.getConversations();
const response = await api.getUserConversations();
conversations.value = response.data.map(conv => ({
...conv,
typing: false