Skip to content

Commit 3a44ad9

Browse files
committed
made binary type immutable
1 parent 8c7ec92 commit 3a44ad9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/controllers/binary.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ exports.binary_update_type = (req, res, next) => {
6868
for (const ops of req.body) {
6969
updateOps[ops.propName] = ops.value;
7070
}
71+
if ("type" in updateOps) {
72+
return res.status(409).json({
73+
message: "Binary type is immutable"
74+
});
75+
}
7176
Binary.update({ type: type }, { $set: updateOps })
7277
.exec()
7378
.then(result => {

0 commit comments

Comments
 (0)