mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-10-31 11:54:12 +00:00
bugfix: generating new account failed due to null webhook_secret
This commit is contained in:
1 parent
e0bacb55e7
commit
ecdf9898f8
1 file changed
+1
-1
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user