feat : role And permission

This commit is contained in:
2025-09-06 14:50:02 +03:30
parent bdf5344451
commit 34609d22a1
34 changed files with 657 additions and 306 deletions

View File

@@ -15,17 +15,17 @@ Future<void> setupInspectionDI() async {
diInspection.registerSingleton(DioErrorHandler());
var tokenService = Get.find<TokenStorageService>();
if (tokenService.baseurl.value == null) {
await tokenService.saveBaseUrl('https://bazrasbackend.rasadyaar.ir/');
await tokenService.saveBaseUrl(Module.inspection,'https://bazrasbackend.rasadyaar.ir/');
}
diInspection.registerLazySingleton<AppInterceptor>(
() => AppInterceptor(
//TODO : Update the base URL to the correct one for inspection module
refreshTokenCallback: () async => null,
saveTokenCallback: (String newToken) async {
await tokenService.saveAccessToken(newToken);
// await tokenService.saveAccessToken(newToken);
},
clearTokenCallback: () async {
await tokenService.deleteTokens();
await tokenService.deleteAllTokens();
Get.offAllNamed(InspectionRoutes.auth, arguments: Module.inspection);
},
authArguments: Module.inspection,