From 6459ce4c9fb22752d3979d7941cf03a83b9cd19e Mon Sep 17 00:00:00 2001 From: William Moore Date: Thu, 25 Aug 2022 23:04:54 -0500 Subject: [PATCH] Update to include authentication --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index f547416..4dbda37 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,7 +41,9 @@ const twilioClient = twilio(TWILIO_SID, TWILIO_AUTH_TOKEN); async function temperatoTick() { try { - const response = await request(GRAPHQL_URL, getSensorDataQuery); + const response = await request(GRAPHQL_URL, getSensorDataQuery, {}, { + 'authorization': process.env.AUTH, + }); if (response.getSensorData.temperato < SET_POINT && response.getSensorData.temperato >= EARLY_WARNING) { numberOfEarlyTicks++;