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 { 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://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 baseUrl = "https://mapi.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 /// 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( static Future<ServiceProjectDetailModel?> getServiceProjectDetailApi(
String projectId) async { String projectId) async {
final endpoint = "${ApiEndpoints.getServiceProjectDetail}/$projectId"; final endpoint = "${ApiEndpoints.getServiceProjectDetail}/$projectId";
@ -517,13 +513,10 @@ class ApiService {
final response = await _getRequest(endpoint); final response = await _getRequest(endpoint);
if (response == null) { if (response == null) {
logSafe("Service Project Detail request failed: null response", logSafe(
level: LogLevel.error); "Service Project Detail request failed: null response",
return null; level: LogLevel.error,
} );
if (response == null) {
logSafe("Service Project Detail request failed: null response",
level: LogLevel.error);
return null; return null;
} }
@ -536,17 +529,14 @@ class ApiService {
return ServiceProjectDetailModel.fromJson(jsonResponse); return ServiceProjectDetailModel.fromJson(jsonResponse);
} }
} catch (e, stack) { } catch (e, stack) {
logSafe("Exception during getServiceProjectDetailApi: $e", logSafe(
level: LogLevel.error); "Exception during getServiceProjectDetailApi: $e",
logSafe("StackTrace: $stack", level: LogLevel.debug); level: LogLevel.error,
} );
if (jsonResponse != null) { logSafe(
return ServiceProjectDetailModel.fromJson(jsonResponse); "StackTrace: $stack",
} level: LogLevel.debug,
} catch (e, stack) { );
logSafe("Exception during getServiceProjectDetailApi: $e",
level: LogLevel.error);
logSafe("StackTrace: $stack", level: LogLevel.debug);
} }
return null; return null;