Skip to content

Commit

Permalink
provide service and subservice when update rule in mongo using findOn…
Browse files Browse the repository at this point in the history
…eAndUpdate
  • Loading branch information
AlvaroVega committed Jun 13, 2024
1 parent d60ce17 commit dc88fe6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/models/rulesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ module.exports = {
db.collection.bind(db, rulesCollectionName, { strict: true }),
function(col, cb) {
col.findOneAndUpdate(
{ name: id },
{
name: id,
service: r.service,
subservice: r.subservice
},
{ $set: r },
{
upsert: false,
Expand Down

0 comments on commit dc88fe6

Please sign in to comment.