Rebase issues solved
This commit is contained in:
parent
2e750ad19c
commit
4900ce87f7
@ -1,8 +1,8 @@
|
||||
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://stageapi.marcoaiot.com/api";
|
||||
// static const String baseUrl = "https://api.marcoaiot.com/api";
|
||||
static const String baseUrl = "https://devapi.marcoaiot.com/api";
|
||||
//static const String baseUrl = "https://devapi.marcoaiot.com/api";
|
||||
|
||||
static const String getMasterCurrencies = "/Master/currencies/list";
|
||||
static const String getMasterExpensesCategories =
|
||||
|
||||
@ -427,35 +427,22 @@ class ApiService {
|
||||
}
|
||||
|
||||
/// Get details of a single service project
|
||||
static Future<ServiceProjectDetailModel?> getServiceProjectDetailApi(
|
||||
String projectId) async {
|
||||
final endpoint = "${ApiEndpoints.getServiceProjectDetail}/$projectId";
|
||||
logSafe("Fetching details for Service Project ID: $projectId");
|
||||
static Future<ServiceProjectDetailModel?> getServiceProjectDetailApi(
|
||||
String projectId) async {
|
||||
final endpoint = "${ApiEndpoints.getServiceProjectDetail}/$projectId";
|
||||
logSafe("Fetching details for Service Project ID: $projectId");
|
||||
|
||||
try {
|
||||
final response = await _getRequest(endpoint);
|
||||
try {
|
||||
final response = await _getRequest(endpoint);
|
||||
|
||||
if (response == null) {
|
||||
logSafe("Service Project Detail request failed: null response",
|
||||
level: LogLevel.error);
|
||||
return null;
|
||||
}
|
||||
if (response == null) {
|
||||
logSafe("Service Project Detail request failed: null response",
|
||||
level: LogLevel.error);
|
||||
return null;
|
||||
}
|
||||
|
||||
final jsonResponse = _parseResponseForAllData(
|
||||
response,
|
||||
label: "Service Project Detail",
|
||||
logSafe(
|
||||
"Service Project Detail request failed: null response",
|
||||
level: LogLevel.error,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
final jsonResponse = _parseResponseForAllData(
|
||||
response,
|
||||
label: "Service Project Detail",
|
||||
@ -465,23 +452,18 @@ class ApiService {
|
||||
return ServiceProjectDetailModel.fromJson(jsonResponse);
|
||||
}
|
||||
} catch (e, stack) {
|
||||
logSafe("Exception during getServiceProjectDetailApi: $e",
|
||||
level: LogLevel.error);
|
||||
logSafe("StackTrace: $stack", level: LogLevel.debug);
|
||||
}
|
||||
if (jsonResponse != null) {
|
||||
return ServiceProjectDetailModel.fromJson(jsonResponse);
|
||||
}
|
||||
} catch (e, stack) {
|
||||
logSafe("Exception during getServiceProjectDetailApi: $e",
|
||||
level: LogLevel.error);
|
||||
logSafe("StackTrace: $stack", level: LogLevel.debug);
|
||||
logSafe(
|
||||
"Exception during getServiceProjectDetailApi: $e",
|
||||
level: LogLevel.error,
|
||||
);
|
||||
logSafe(
|
||||
"StackTrace: $stack",
|
||||
level: LogLevel.debug,
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get Service Project List
|
||||
static Future<ServiceProjectListModel?> getServiceProjectsListApi({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user