Rebase issues solved

This commit is contained in:
Manish 2025-11-17 11:32:07 +05:30 committed by Vaibhav Surve
parent 793eeec7fa
commit 68ed97b64a
2 changed files with 13 additions and 23 deletions

View File

@ -1,5 +1,5 @@
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";
// static const String baseUrl = "https://devapi.marcoaiot.com/api";
// static const String baseUrl = "https://mapi.marcoaiot.com/api";

View File

@ -504,10 +504,6 @@ 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";
@ -517,13 +513,10 @@ class ApiService {
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);
logSafe(
"Service Project Detail request failed: null response",
level: LogLevel.error,
);
return null;
}
@ -536,17 +529,14 @@ 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;