Skip to content

Commit

Permalink
refactor: redirect / to custom link
Browse files Browse the repository at this point in the history
  • Loading branch information
idoshamun committed Dec 23, 2024
1 parent 4b6970b commit a886434
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/routes/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
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'),
Expand Down

0 comments on commit a886434

Please sign in to comment.