Feature_Global_Project_Selection #47

Merged
vaibhav.surve merged 22 commits from Feature_Global_Project_Selection into main 2025-06-17 10:09:58 +00:00
Showing only changes of commit d765b96df4 - Show all commits

View File

@ -8,12 +8,13 @@ import 'package:marco/model/employee_info.dart';
import 'package:marco/model/projects_model.dart';
import 'package:marco/helpers/services/storage/local_storage.dart';
import 'package:marco/helpers/services/auth_service.dart';
import 'package:marco/helpers/services/api_endpoints.dart';
final Logger logger = Logger();
class PermissionService {
static final Map<String, Map<String, dynamic>> _userDataCache = {};
static const String _baseUrl = ApiEndpoints.baseUrl;
/// Fetches all user-related data (permissions, employee info, projects)
static Future<Map<String, dynamic>> fetchAllUserData(
String token, {
@ -24,7 +25,7 @@ class PermissionService {
return _userDataCache[token]!;
}
final uri = Uri.parse('https://stageapi.marcoaiot.com/api/user/profile');
final uri = Uri.parse("$_baseUrl/user/profile");
final headers = {'Authorization': 'Bearer $token'};
try {