From 0cb705eb9c2da996f146d16995b0959e6b970b16 Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Mon, 25 Jul 2022 13:36:19 -0400 Subject: [PATCH] STATUS_NOT_FOUND -> NOT_FOUND --- src/api.ts | 2 +- src/server.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api.ts b/src/api.ts index d74d572..44218d6 100644 --- a/src/api.ts +++ b/src/api.ts @@ -24,7 +24,7 @@ export const statueAPI = async ( /* {"errors":[{"code":34,"message":"Sorry, that page does not exist."}]} */ if (conversation.errors?.[0]?.code === 34) { - return { code: 404, message: 'STATUS_NOT_FOUND' }; + return { code: 404, message: 'NOT_FOUND' }; } /* Tweets object is completely missing, smells like API failure */ diff --git a/src/server.ts b/src/server.ts index 7d39afe..3fb1279 100644 --- a/src/server.ts +++ b/src/server.ts @@ -98,6 +98,7 @@ router.get('/:prefix?/:handle/statuses/:id/photos/:mediaNumber', statusRequest); router.get('/:prefix?/:handle/statuses/:id/video/:mediaNumber', statusRequest); router.get('/:prefix?/:handle/status/:id/:language', statusRequest); router.get('/:prefix?/:handle/statuses/:id/:language', statusRequest); +router.get('/status/:id', statusRequest); router.get('/owoembed', async (request: Request) => { console.log('oembed hit!');