From ecdf9898f827b356ecde909baddf378ceb8d398f Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 16 Aug 2021 08:25:19 -0400 Subject: [PATCH] bugfix: generating new account failed due to null webhook_secret --- lib/routes/api/accounts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/api/accounts.js b/lib/routes/api/accounts.js index f967cd6..10761ea 100644 --- a/lib/routes/api/accounts.js +++ b/lib/routes/api/accounts.js @@ -291,7 +291,7 @@ router.post('/', async(req, res) => { await validateAdd(req); // create webhooks if provided - const obj = Object.assign({webhook_secret: secret}, req.body); + const obj = {...req.body, webhook_secret: secret}; for (const prop of ['registration_hook']) { if (obj[prop]) { obj[`${prop}_sid`] = await Webhook.make(obj[prop]);