fix: Comment out unused base URL in API service files and update login redirection path

This commit is contained in:
Vaibhav Surve 2025-06-06 12:25:12 +05:30
parent 905b3e32c5
commit 0b8a5364ae
3 changed files with 4 additions and 1 deletions

View File

@ -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";

View File

@ -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<String, String> _headers = {
'Content-Type': 'application/json',
};

View File

@ -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<UserPermission> _parsePermissions(