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 19:43:00 +00:00
committed by GitHub
co-authored by kodiakhq[bot]
parent b64d657241
commit 01d75c8b8b
+1 -1
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 });
}