[WIP] Фикс запросов, добавил валидацию основных данных
This commit is contained in:
@@ -437,14 +437,11 @@ const actions = {
|
||||
});
|
||||
},
|
||||
postUpdateAddress(context, { id, address, category }) {
|
||||
fetchWrapper.post(`address/${id}`, {
|
||||
fetchWrapper.patch(`address/${id}`, {
|
||||
...address,
|
||||
category: category,
|
||||
});
|
||||
},
|
||||
deleteAddress(context, { id }) {
|
||||
fetchWrapper.del(`address/${id}`);
|
||||
},
|
||||
postCreateContact(context, { obj, id }) {
|
||||
fetchWrapper.post("contacts", {
|
||||
person_id: id,
|
||||
@@ -452,9 +449,7 @@ const actions = {
|
||||
});
|
||||
},
|
||||
postUpdateContact(context, { obj, id }) {
|
||||
fetchWrapper.post(`contacts/${id}`, {
|
||||
...obj,
|
||||
});
|
||||
fetchWrapper.patch(`contacts/${id}`, obj);
|
||||
},
|
||||
deleteContact(context, { id }) {
|
||||
fetchWrapper.del(`contacts/${id}`);
|
||||
|
||||
Reference in New Issue
Block a user