ваше сообщение коммита

This commit is contained in:
2025-05-28 16:23:11 +03:00
parent 093e599847
commit cd6e9bc663
12 changed files with 1148 additions and 102 deletions

View File

@@ -7,5 +7,13 @@ export default {
return res.data.contacts;
}
return [];
},
async updateContact(id, data) {
const res = await api.patch(`/api/users/${id}`, data);
return res.data;
},
async deleteContact(id) {
const res = await api.delete(`/api/users/${id}`);
return res.data;
}
};

View File

@@ -0,0 +1,9 @@
import axios from 'axios';
export default {
async getMessagesByUserId(userId) {
if (!userId) return [];
const { data } = await axios.get(`/api/messages?userId=${userId}`);
return data;
}
};