Closed mlhaufe closed 6 days ago
Currently, nearly every page has the following pattern:
import SolutionRepository from '~/modules/solution/data/SolutionRepository'; import SolutionInteractor from '~/modules/solution/application/SolutionInteractor'; const router = useRouter(), route = useRoute(), slug = route.params.solutionSlug as string, solutionInteractor = new SolutionInteractor(new SolutionRepository()), solution = (await solutionInteractor.getAll({ slug }))[0]; if (!solution) router.push({ name: 'Solutions' })
Move this logic to middleware:
https://nuxt.com/docs/guide/directory-structure/middleware
Still not working.
Currently, nearly every page has the following pattern:
Move this logic to middleware:
https://nuxt.com/docs/guide/directory-structure/middleware