Update API calls to use getUserConversations instead of getConversations
This commit is contained in:
parent
c61a15c8a7
commit
505a4ddfa7
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user