Update to include authentication

This commit is contained in:
William Moore 2022-08-25 23:04:54 -05:00
parent 69f91a2b87
commit 6459ce4c9f

View File

@ -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++;