Fixing error on client creation
This commit is contained in:
parent
6580cbf667
commit
24f4f12845
@ -145,7 +145,7 @@ Handlebars.registerHelper("formatDate", function (datetime, format) {
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
let id = data._id;
|
let id = data._id;
|
||||||
delete data._id;
|
delete data._id;
|
||||||
if (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 {
|
||||||
request("/api/admin/client", "POST", data).then(() => setCustomCard()).then(() => loadList()).catch(catchError)
|
request("/api/admin/client", "POST", data).then(() => setCustomCard()).then(() => loadList()).catch(catchError)
|
||||||
|
Loading…
Reference in New Issue
Block a user