create-sip 1.4.5 → 1.4.6
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.
|
@@ -54,6 +54,9 @@ const ThingController = {
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
async tryStore(req, res) {
|
|
57
|
+
if(req.body.id) {
|
|
58
|
+
delete req.body.id
|
|
59
|
+
}
|
|
57
60
|
const thing = await Thing.create(req.body)
|
|
58
61
|
res.status(201)
|
|
59
62
|
res.json({
|
|
@@ -81,6 +84,9 @@ const ThingController = {
|
|
|
81
84
|
}
|
|
82
85
|
},
|
|
83
86
|
async tryUpdate(req, res) {
|
|
87
|
+
if(req.body.id) {
|
|
88
|
+
delete req.body.id
|
|
89
|
+
}
|
|
84
90
|
const recordNumber = await Thing.update(req.body, {
|
|
85
91
|
where: { id: req.params.id }
|
|
86
92
|
})
|