From 18b041697cf0b9f9af35de6f488f119c34aa837a Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Wed, 31 May 2023 16:37:54 -0400 Subject: [PATCH] Improve api/status --- src/api/status.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/api/status.ts b/src/api/status.ts index e990020..eb5eaf2 100644 --- a/src/api/status.ts +++ b/src/api/status.ts @@ -227,11 +227,13 @@ export const statusAPI = async ( return { code: 404, message: 'NOT_FOUND' }; } + /* Commented this the part below out for now since it seems like atm this check doesn't actually do anything */ + /* Tweets object is completely missing, smells like API failure */ - if (typeof conversation?.globalObjects?.tweets === 'undefined') { - writeDataPoint(event, language, wasMediaBlockedNSFW, 'API_FAIL', flags); - return { code: 500, message: 'API_FAIL' }; - } + // if (typeof conversation?.globalObjects?.tweets === 'undefined') { + // writeDataPoint(event, language, wasMediaBlockedNSFW, 'API_FAIL', flags); + // return { code: 500, message: 'API_FAIL' }; + // } /* If we have no idea what happened then just return API error */ writeDataPoint(event, language, wasMediaBlockedNSFW, 'API_FAIL', flags);