Fixing id bug on client add
This commit is contained in:
parent
24f4f12845
commit
ed8b33aaa1
@ -143,8 +143,8 @@ Handlebars.registerHelper("formatDate", function (datetime, format) {
|
|||||||
console.log(elm);
|
console.log(elm);
|
||||||
let data = getFormData(elm);
|
let data = getFormData(elm);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
let id = data._id;
|
let id = data.id;
|
||||||
delete data._id;
|
delete data.id;
|
||||||
if (id && id !== "") {
|
if (id && id !== "") {
|
||||||
request("/api/admin/client?id=" + id, "PUT", data).then(() => setCustomCard()).then(() => loadList()).catch(catchError)
|
request("/api/admin/client?id=" + id, "PUT", data).then(() => setCustomCard()).then(() => loadList()).catch(catchError)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user