Skip to content

Commit f6ea6cb

Browse files
committed
fix webhooks subs data storage
1 parent fd267d1 commit f6ea6cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/services/webhook.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ export function githubWebhook(event, uid, data) {
104104
default: return; // Given action is not supported yet (exit without saving).
105105
}
106106

107-
return Webhook.update(
107+
return Webhook.findOneAndUpdate(
108108
{ type: 'github', uid },
109109
{ $setOnInsert: webhook },
110-
{ upsert: true },
110+
{ upsert: true, new: true },
111111
);
112112
}
113113

0 commit comments

Comments
 (0)