Fastify/5/Redirect Arg Order

1.0.0Last update Sep 17, 2024
by@manishjha-04

This codemod updates reply.redirect by placing the status code as the second argument, as per Fastify v5 conventions.

Before

reply.redirect(301, '/new-route');

After

reply.redirect('/new-route', 301);

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now