Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
[MegaLinter] Apply linters fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scottqueen-bixal authored and github-actions[bot] committed Jan 17, 2024
1 parent 0750ac1 commit d65cc70
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions middleware/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,30 @@ export default function (ctx) {
if (ctx.route.fullPath === "/" || ctx.route.fullPath === "") ctx.redirect(301, "https://www.usa.gov/benefit-finder")

// https://benefits-tool.usa.gov/es https://usa.gov/es/buscador-beneficios
if (ctx.route.fullPath === "/es" || ctx.route.fullPath === "/es/") ctx.redirect(301, "https://www.usa.gov/es/buscador-beneficios")
if (ctx.route.fullPath === "/es" || ctx.route.fullPath === "/es/")
ctx.redirect(301, "https://www.usa.gov/es/buscador-beneficios")

// https://benefits-tool.usa.gov/death-of-a-loved-one https://usa.gov/benefit-finder/death
if (ctx.route.fullPath === "/death-of-a-loved-one" || ctx.route.fullPath === "/death-of-a-loved-one/") ctx.redirect(301, "https://www.usa.gov/benefit-finder/death")
if (ctx.route.fullPath === "/death-of-a-loved-one" || ctx.route.fullPath === "/death-of-a-loved-one/")
ctx.redirect(301, "https://www.usa.gov/benefit-finder/death")

// https://benefits-tool.usa.gov/es/death-of-a-loved-one https://usa.gov/es/buscador-beneficios/muerte
if (ctx.route.fullPath === "/es/death-of-a-loved-one" || ctx.route.fullPath === "/es/death-of-a-loved-one/") ctx.redirect(301, "https://www.usa.gov/es/buscador-beneficios/muerte")
if (ctx.route.fullPath === "/es/death-of-a-loved-one" || ctx.route.fullPath === "/es/death-of-a-loved-one/")
ctx.redirect(301, "https://www.usa.gov/es/buscador-beneficios/muerte")

// https://benefits-tool.usa.gov/disability https://usa.gov/benefit-finder/disability
if (ctx.route.fullPath === "/disability" || ctx.route.fullPath === "/disability/") ctx.redirect(301, "https://usa.gov/benefit-finder/disability")
if (ctx.route.fullPath === "/disability" || ctx.route.fullPath === "/disability/")
ctx.redirect(301, "https://usa.gov/benefit-finder/disability")

// https://benefits-tool.usa.gov/es/disability https://usa.gov/es/buscador-beneficios/discapacidad
if (ctx.route.fullPath === "/es/disability" || ctx.route.fullPath === "/es/disability/") ctx.redirect(301, "https://usa.gov/es/buscador-beneficios/discapacidad")
if (ctx.route.fullPath === "/es/disability" || ctx.route.fullPath === "/es/disability/")
ctx.redirect(301, "https://usa.gov/es/buscador-beneficios/discapacidad")

// https://benefits-tool.usa.gov/retirement https://usa.gov/benefit-finder/retirement
if (ctx.route.fullPath === "/retirement" || ctx.route.fullPath === "/retirement/") ctx.redirect(301, "https://usa.gov/benefit-finder/retirement")
if (ctx.route.fullPath === "/retirement" || ctx.route.fullPath === "/retirement/")
ctx.redirect(301, "https://usa.gov/benefit-finder/retirement")

// https://benefits-tool.usa.gov/es/retirement https://usa.gov/es/buscador-beneficios/jubilacion
if (ctx.route.fullPath === "/es/retirement" || ctx.route.fullPath === "/es/retirement/") ctx.redirect(301, "https://usa.gov/es/buscador-beneficios/jubilacion")

if (ctx.route.fullPath === "/es/retirement" || ctx.route.fullPath === "/es/retirement/")
ctx.redirect(301, "https://usa.gov/es/buscador-beneficios/jubilacion")
}

0 comments on commit d65cc70

Please sign in to comment.