fix: Comment out unused base URL in API service files and update login redirection path
This commit is contained in:
parent
905b3e32c5
commit
0b8a5364ae
@ -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";
|
||||
|
@ -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',
|
||||
};
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user