@keltoi/hydra 2.0.10 → 2.0.12
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.
- package/index.js +2 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -97,9 +97,7 @@ class Entity{
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
class Model {
|
|
100
|
-
constructor(
|
|
101
|
-
|
|
102
|
-
}
|
|
100
|
+
constructor() {}
|
|
103
101
|
|
|
104
102
|
static fromEntity(entity = new Entity()) {
|
|
105
103
|
return new Model(entity.$)
|
|
@@ -485,7 +483,7 @@ let Repository$1 = class Repository{
|
|
|
485
483
|
.where(entity.key)
|
|
486
484
|
.del()
|
|
487
485
|
.then(affected=> affected > 0
|
|
488
|
-
? new Result({ code:200,
|
|
486
|
+
? new Result({ code:200,data:`${this.#name} deleted` })
|
|
489
487
|
: new Result({ code:404,message:'Not found' })
|
|
490
488
|
)
|
|
491
489
|
.catch(err=>Promise.reject( new Result({code:500,message:err}) ))
|