From 51bb3462fc4090dcfdf745e4da1797df0ab83094 Mon Sep 17 00:00:00 2001 From: pheralb Date: Thu, 22 Aug 2024 17:45:01 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Update=20``too=20many=20re?= =?UTF-8?q?quest``=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-routes/src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api-routes/src/index.ts b/api-routes/src/index.ts index cddb391..d941a06 100644 --- a/api-routes/src/index.ts +++ b/api-routes/src/index.ts @@ -74,7 +74,7 @@ app.get('/', async (c) => { const { success } = await ratelimit.limit(ip ?? 'anonymous'); if (!success) { - return c.json({ error: 'Too many request' }, 429); + return c.json({ error: '🛑 Too many request' }, 429); } if (limit) { @@ -104,7 +104,7 @@ app.get('/categories', async (c) => { const { success } = await ratelimit.limit(ip ?? 'anonymous'); if (!success) { - return c.json({ error: 'Too many request' }, 429); + return c.json({ error: '🛑 Too many request' }, 429); } const categoryTotals: Record = {}; @@ -127,7 +127,7 @@ app.get('/categories', async (c) => { return c.json(categories); }); -// 🌱 GET: "/category/:category - Return an list of svgs by specific category: +// 🌱 GET: /category/:category - Return an list of svgs by specific category: app.get('/category/:category', async (c) => { const category = c.req.param('category') as string; const targetCategory = category.charAt(0).toUpperCase() + category.slice(1); @@ -136,7 +136,7 @@ app.get('/category/:category', async (c) => { const { success } = await ratelimit.limit(ip ?? 'anonymous'); if (!success) { - return c.json({ error: 'Too many request' }, 429); + return c.json({ error: '🛑 Too many request' }, 429); } const categorySvgs = fullRouteSvgsData.filter((svg) => {