notherbase-fs 4.4.3 → 4.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,6 +22,7 @@ export default class SpiritWorld {
|
|
|
22
22
|
this.router.post("/loadAll", this.loadAll);
|
|
23
23
|
this.router.post("/load", this.load);
|
|
24
24
|
this.router.post("/save", this.save);
|
|
25
|
+
this.router.post("/delete", this.delete);
|
|
25
26
|
this.router.post("/serve", this.serve);
|
|
26
27
|
this.router.use("/user", this.user.router);
|
|
27
28
|
}
|
|
@@ -175,7 +176,8 @@ export default class SpiritWorld {
|
|
|
175
176
|
}
|
|
176
177
|
|
|
177
178
|
// save the spirit with the given service name and parent
|
|
178
|
-
let spirit =
|
|
179
|
+
let spirit = null;
|
|
180
|
+
if (id !== "new") await req.db.Spirit.recallOne(req.body.service, parent, {}, id);
|
|
179
181
|
|
|
180
182
|
if (spirit) {
|
|
181
183
|
// update existing spirit
|