Skip to content

Commit f54ebec

Browse files
committed
feat(routes): inject language repository into dependency chain
- Add language repository to the list of provided dependencies in the middleware function - This change enables access to the language repository throughout the application, facilitating language-related operations and improving modularity
1 parent 73bd0aa commit f54ebec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

routes/_middleware.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ Handler middleware(Handler handler) {
9090
(_) => deps.countryRepository,
9191
),
9292
) //
93+
.use(
94+
provider<DataRepository<Language>>(
95+
(_) => deps.languageRepository,
96+
),
97+
) //
9398
.use(
9499
provider<DataRepository<User>>((_) => deps.userRepository),
95100
) //

0 commit comments

Comments
 (0)