fix : login and route
This commit is contained in:
@@ -16,6 +16,5 @@ Future<void> setupAuthDI() async {
|
||||
diAuth.registerCachedFactory<AuthRepositoryImpl>(
|
||||
() => AuthRepositoryImpl(dioRemote),
|
||||
);
|
||||
diAuth.registerLazySingleton<TokenStorageService>(() => TokenStorageService());
|
||||
diAuth.registerLazySingleton<DioErrorHandler>(() => DioErrorHandler());
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:rasadyar_core/core.dart';
|
||||
import '../../presentation/routes/pages.dart';
|
||||
|
||||
class AuthMiddleware extends GetMiddleware {
|
||||
var tokenService = diAuth.get<TokenStorageService>();
|
||||
var tokenService = Get.find<TokenStorageService>();
|
||||
|
||||
@override
|
||||
RouteSettings? redirect(String? route) {
|
||||
|
||||
Reference in New Issue
Block a user