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);
|
||||
let data = getFormData(elm);
|
||||
console.log(data);
|
||||
let id = data._id;
|
||||
delete data._id;
|
||||
let id = data.id;
|
||||
delete data.id;
|
||||
if (id && id !== "") {
|
||||
request("/api/admin/client?id=" + id, "PUT", data).then(() => setCustomCard()).then(() => loadList()).catch(catchError)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user