Make API routes more lenient (maybe #483?)

This commit is contained in:
dangered wolf 2023-11-12 19:50:31 -05:00
parent d53a41b45a
commit d682b07fa5
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58

View file

@ -7,10 +7,14 @@ import { Constants } from '../../constants';
export const api = new Hono();
/* Current v1 API endpoints. Currently, these still go through the Twitter embed requests. API v2+ won't do this. */
api.get('/status/:id/:language?', statusRequest);
api.get('/status/:id/:language?/', statusRequest);
api.get('/:handle/status/:id/:language?', statusRequest);
api.get('/:handle/status/:id/:language?/', statusRequest);
api.get('/status/:id', statusRequest);
api.get('/status/:id/', statusRequest);
api.get('/status/:id/:language', statusRequest);
api.get('/status/:id/:language/', statusRequest);
api.get('/:handle/status/:id', statusRequest);
api.get('/:handle/status/:id/', statusRequest);
api.get('/:handle/status/:id/:language', statusRequest);
api.get('/:handle/status/:id/:language/', statusRequest);
api.get('/robots.txt', async c => c.text(Strings.ROBOTS_TXT_API));
api.get('/:handle', profileRequest);