From 0b8a5364ae3cd8d28ac7789e858040730e2cf405 Mon Sep 17 00:00:00 2001 From: Vaibhav Surve Date: Fri, 6 Jun 2025 12:25:12 +0530 Subject: [PATCH] fix: Comment out unused base URL in API service files and update login redirection path --- lib/helpers/services/api_endpoints.dart | 1 + lib/helpers/services/auth_service.dart | 1 + lib/helpers/services/permission_service.dart | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/helpers/services/api_endpoints.dart b/lib/helpers/services/api_endpoints.dart index 09cb6c1..19c2f75 100644 --- a/lib/helpers/services/api_endpoints.dart +++ b/lib/helpers/services/api_endpoints.dart @@ -1,5 +1,6 @@ class ApiEndpoints { static const String baseUrl = "https://stageapi.marcoaiot.com/api"; + // static const String baseUrl = "https://api.marcoaiot.com/api"; // Attendance Screen API Endpoints static const String getProjects = "/project/list"; diff --git a/lib/helpers/services/auth_service.dart b/lib/helpers/services/auth_service.dart index 60a8290..a7c356d 100644 --- a/lib/helpers/services/auth_service.dart +++ b/lib/helpers/services/auth_service.dart @@ -8,6 +8,7 @@ final Logger logger = Logger(); class AuthService { static const String _baseUrl = "https://stageapi.marcoaiot.com/api"; + // static const String _baseUrl = "https://api.marcoaiot.com/api"; static const Map _headers = { 'Content-Type': 'application/json', }; diff --git a/lib/helpers/services/permission_service.dart b/lib/helpers/services/permission_service.dart index c0cae90..f4d4dba 100644 --- a/lib/helpers/services/permission_service.dart +++ b/lib/helpers/services/permission_service.dart @@ -23,6 +23,7 @@ class PermissionService { try { final response = await http.get( Uri.parse('https://stageapi.marcoaiot.com/api/user/profile'), + // Uri.parse('https://api.marcoaiot.com/api/user/profile'), headers: {'Authorization': 'Bearer $token'}, ); @@ -65,7 +66,7 @@ class PermissionService { await LocalStorage.removeToken('jwt_token'); await LocalStorage.removeToken('refresh_token'); await LocalStorage.setLoggedInUser(false); - Get.offAllNamed('/auth/login'); + Get.offAllNamed('/auth/login-option'); } static List _parsePermissions(