fix(Client): don't auth for webhook fetches with token (#8709)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
ckohen
2022-10-06 12:43:00 -07:00
committed by GitHub
parent b64d657241
commit 01d75c8b8b

View File

@@ -313,7 +313,7 @@ class Client extends BaseClient {
* .catch(console.error);
*/
async fetchWebhook(id, token) {
const data = await this.rest.get(Routes.webhook(id, token));
const data = await this.rest.get(Routes.webhook(id, token), { auth: typeof token === 'undefined' });
return new Webhook(this, { token, ...data });
}