From a88643420855ef8e139d0a00a5348da887ffa9fa Mon Sep 17 00:00:00 2001 From: Ido Shamun Date: Mon, 23 Dec 2024 08:51:41 +0200 Subject: [PATCH] refactor: redirect / to custom link --- src/routes/redirects.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/routes/redirects.ts b/src/routes/redirects.ts index dd3c2c64d..c4463c9ca 100644 --- a/src/routes/redirects.ts +++ b/src/routes/redirects.ts @@ -137,16 +137,13 @@ const redirectToProfileImage = async ( return res.redirect(image); }; -const redirectToLanding = ( - req: FastifyRequest, - res: FastifyReply, -): FastifyReply => res.redirect('https://daily.dev'); - export default async function (fastify: FastifyInstance): Promise { const con = await createOrGetConnection(); - fastify.get('/', redirectToLanding); - fastify.get('/landing', redirectToLanding); + fastify.get('/', (req, res) => + res.redirect('https://r.daily.dev/api-redirect'), + ); + fastify.get('/landing', (req, res) => res.redirect('https://daily.dev')); fastify.get('/tos', (req, res) => res.redirect('https://daily.dev/tos')); fastify.get('/privacy', (req, res) => res.redirect('https://daily.dev/privacy'),