Skip to content

Commit

Permalink
Fixed middleware (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhaufe authored Jun 28, 2024
1 parent b3b9497 commit 1b1a035
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import SolutionInteractor from "~/application/SolutionInteractor"
import SolutionRepository from "~/data/SolutionRepository"

export default defineNuxtRouteMiddleware(async (to, from) => {
const slug = to.params.slug
const slug = to.params.slug,
// An error is thrown if these are imported at the top of the file
SolutionInteractor = (await import('../application/SolutionInteractor')).default,
SolutionRepository = (await import('../data/SolutionRepository')).default

if (slug) {
const solutionInteractor = new SolutionInteractor(new SolutionRepository()),
Expand Down

0 comments on commit 1b1a035

Please sign in to comment.