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 {
|
class ApiEndpoints {
|
||||||
static const String baseUrl = "https://stageapi.marcoaiot.com/api";
|
static const String baseUrl = "https://stageapi.marcoaiot.com/api";
|
||||||
|
// static const String baseUrl = "https://api.marcoaiot.com/api";
|
||||||
|
|
||||||
// Attendance Screen API Endpoints
|
// Attendance Screen API Endpoints
|
||||||
static const String getProjects = "/project/list";
|
static const String getProjects = "/project/list";
|
||||||
|
|||||||
@ -8,6 +8,7 @@ final Logger logger = Logger();
|
|||||||
|
|
||||||
class AuthService {
|
class AuthService {
|
||||||
static const String _baseUrl = "https://stageapi.marcoaiot.com/api";
|
static const String _baseUrl = "https://stageapi.marcoaiot.com/api";
|
||||||
|
// static const String _baseUrl = "https://api.marcoaiot.com/api";
|
||||||
static const Map<String, String> _headers = {
|
static const Map<String, String> _headers = {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -23,6 +23,7 @@ class PermissionService {
|
|||||||
try {
|
try {
|
||||||
final response = await http.get(
|
final response = await http.get(
|
||||||
Uri.parse('https://stageapi.marcoaiot.com/api/user/profile'),
|
Uri.parse('https://stageapi.marcoaiot.com/api/user/profile'),
|
||||||
|
// Uri.parse('https://api.marcoaiot.com/api/user/profile'),
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -65,7 +66,7 @@ class PermissionService {
|
|||||||
await LocalStorage.removeToken('jwt_token');
|
await LocalStorage.removeToken('jwt_token');
|
||||||
await LocalStorage.removeToken('refresh_token');
|
await LocalStorage.removeToken('refresh_token');
|
||||||
await LocalStorage.setLoggedInUser(false);
|
await LocalStorage.setLoggedInUser(false);
|
||||||
Get.offAllNamed('/auth/login');
|
Get.offAllNamed('/auth/login-option');
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<UserPermission> _parsePermissions(
|
static List<UserPermission> _parsePermissions(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user