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

This commit is contained in:
2025-12-10 09:27:36 +03:00
parent 13ac707844
commit 863759e3e7
21 changed files with 1738 additions and 301 deletions

View File

@@ -27,10 +27,11 @@ export default {
const res = await api.get(`/pages/${id}`);
return res.data;
},
async updatePage(id, data) {
console.log('[pagesService] updatePage:', { id, data });
async updatePage(id, data, isFormData = false) {
console.log('[pagesService] updatePage:', { id, isFormData });
try {
const res = await api.patch(`/pages/${id}`, data);
const config = isFormData ? { headers: { 'Content-Type': 'multipart/form-data' } } : undefined;
const res = await api.patch(`/pages/${id}`, data, config);
console.log('[pagesService] updatePage успешно:', res.data);
return res.data;
} catch (error) {