From 41f453f66ff0bf7666d74929480d46a86da20622 Mon Sep 17 00:00:00 2001 From: Greg Walker Date: Wed, 20 Nov 2024 12:38:32 -0600 Subject: [PATCH] must authorize! --- src/utils/tock.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/tock.js b/src/utils/tock.js index a09c82a..f7d6306 100644 --- a/src/utils/tock.js +++ b/src/utils/tock.js @@ -4,7 +4,9 @@ const { getSlackUsers } = require("./slack"); const getFromTock = async (url) => cache(`tock fetch: ${url}`, 10, async () => { const absoluteURL = new URL(url, process.env.TOCK_API); - return fetch(absoluteURL).then((r) => r.json()); + return fetch(absoluteURL, { + headers: { Authorization: `Token ${process.env.TOCK_TOKEN}` }, + }).then((r) => r.json()); }); /**