@keltoi/hydra 2.2.1 → 2.2.2
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 +5 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -701,7 +701,11 @@ class DbLinked {
|
|
|
701
701
|
this.myContext()
|
|
702
702
|
.where(linked.key)
|
|
703
703
|
.del()
|
|
704
|
-
.then(affected=>
|
|
704
|
+
.then(affected=>
|
|
705
|
+
affected > 0
|
|
706
|
+
?new Result({data:affected})
|
|
707
|
+
:new Result({code:404,message:'Not found'})
|
|
708
|
+
)
|
|
705
709
|
.catch(err=>Promise.reject(new Result({code:500,message:err})))
|
|
706
710
|
|
|
707
711
|
|