fix(Webhook): throw an error if no token is available when it's required (#5798)

This commit is contained in:
SpaceEEC
2021-06-10 18:05:45 +02:00
committed by GitHub
parent e0ab836b2d
commit eb98e33a85
3 changed files with 14 additions and 2 deletions

View File

@@ -290,7 +290,7 @@ class Client extends BaseClient {
return this.api
.webhooks(id, token)
.get()
.then(data => new Webhook(this, data));
.then(data => new Webhook(this, { token, ...data }));
}
/**