bugfix: generating new account failed due to null webhook_secret

This commit is contained in:
Dave Horton
2021-08-16 08:25:19 -04:00
parent e0bacb55e7
commit ecdf9898f8
+1 -1
View File
@@ -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]);