diff --git a/src/realms/api/router.ts b/src/realms/api/router.ts index a6bac4a..d0d067e 100644 --- a/src/realms/api/router.ts +++ b/src/realms/api/router.ts @@ -9,10 +9,13 @@ export const api = new Hono(); api.use('*', async (c, next) => { if (!c.req.header('user-agent')) { - return c.json({ - error: - "You must identify yourself with a User-Agent header in order to use the FixTweet API. We recommend using a descriptive User-Agent header to identify your app, such as 'MyAwesomeBot/1.0 (+http://example.com/myawesomebot)'. We don't track or save what kinds of data you are pulling, but you may be blocked if you send too many requests from an unidentifiable user agent." - }, 401); + return c.json( + { + error: + "You must identify yourself with a User-Agent header in order to use the FixTweet API. We recommend using a descriptive User-Agent header to identify your app, such as 'MyAwesomeBot/1.0 (+http://example.com/myawesomebot)'. We don't track or save what kinds of data you are pulling, but you may be blocked if you send too many requests from an unidentifiable user agent." + }, + 401 + ); } await next(); }); diff --git a/src/realms/twitter/routes/redirects.ts b/src/realms/twitter/routes/redirects.ts index a9a9b31..fc711b8 100644 --- a/src/realms/twitter/routes/redirects.ts +++ b/src/realms/twitter/routes/redirects.ts @@ -28,7 +28,8 @@ export const setRedirectRequest = async (c: Context) => { return c.html( Strings.MESSAGE_HTML.format({ message: `Failed to set base redirect: Your request seems to be originating from another domain, please open this up in a new tab if you are trying to set your base redirect.` - }), 403 + }), + 403 ); } @@ -47,7 +48,8 @@ export const setRedirectRequest = async (c: Context) => { return c.html( Strings.MESSAGE_HTML.format({ message: `Your base redirect has been cleared. To set one, please pass along the url parameter.` - }), 200 + }), + 200 ); } @@ -71,7 +73,8 @@ export const setRedirectRequest = async (c: Context) => { return c.html( Strings.MESSAGE_HTML.format({ message: `Your URL does not appear to be well-formed. Example: ?url=https://nitter.net` - }), 200 + }), + 200 ); } diff --git a/src/render/instantview.ts b/src/render/instantview.ts index c42dda4..280925b 100644 --- a/src/render/instantview.ts +++ b/src/render/instantview.ts @@ -302,8 +302,8 @@ export const renderInstantView = (properties: RenderProperties): ResponseInstruc let previousThreadPieceAuthor: string | null = null; let originalAuthor: string | null = null; - - const useThread = thread?.thread ?? [ thread?.status ] + + const useThread = thread?.thread ?? [thread?.status]; if (!status) { throw new Error('Status is undefined'); @@ -339,7 +339,8 @@ export const renderInstantView = (properties: RenderProperties): ResponseInstruc View full thread

${status.author.name} (@${status.author.screen_name})

- ${useThread.map(status => { + ${useThread + .map(status => { console.log('previousThreadPieceAuthor', previousThreadPieceAuthor); if (!status) { return '';