From 5414f2c4accb8be61af48b023e0472569e8ae9e3 Mon Sep 17 00:00:00 2001 From: YujithIsura Date: Mon, 19 Aug 2024 15:15:18 +0530 Subject: [PATCH] build error fixed --- api/main.bal | 5 +---- client/geo_data_client.bal | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/api/main.bal b/api/main.bal index 691ca97..09169e7 100644 --- a/api/main.bal +++ b/api/main.bal @@ -4744,7 +4744,6 @@ AND p.organization_id IN ( if (check_least_updated_inventory_data_for_date == 0) { - inventory_data = db_client->query( `SELECT I.id, @@ -4782,7 +4781,6 @@ AND p.organization_id IN ( `); } else { - inventory_data = db_client->query( `SELECT I.id, @@ -4901,7 +4899,6 @@ AND p.organization_id IN ( return inventoryDatas; } - remote function consumable_replenishment(int person_id, int organization_id, string date, Inventory[] inventories) returns InventoryData[]|error? { InventoryData[] newlyAddedInventoryDatas = []; @@ -4988,7 +4985,7 @@ AND p.organization_id IN ( return newlyAddedInventoryDepletionDatas; } - isolated resource function get consumable_weekly_report(int? organization_id, string? from_date = null, string? to_date = null) returns InventoryData[]|error? { + isolated resource function get consumable_weekly_report(int? organization_id, string? from_date = "", string? to_date = "") returns InventoryData[]|error? { stream weekly_consumable_summary_data; diff --git a/client/geo_data_client.bal b/client/geo_data_client.bal index f77f806..c27b6f8 100644 --- a/client/geo_data_client.bal +++ b/client/geo_data_client.bal @@ -1,17 +1,17 @@ -import ballerina/http; +// import ballerina/http; import ballerina/graphql; public isolated client class Geo_dataClient { final graphql:Client graphqlClient; - public isolated function init(string serviceUrl, http:ClientConfiguration clientConfig = {}) returns graphql:ClientError? { + public isolated function init(string serviceUrl, graphql:ClientConfiguration clientConfig = {}) returns graphql:ClientError? { graphql:Client clientEp = check new (serviceUrl, clientConfig); self.graphqlClient = clientEp; return; } remote isolated function DistrictAndCityByProvince(string name) returns DistrictAndCityByProvinceResponse|graphql:ClientError { string query = string `query DistrictAndCityByProvince($name:String!) {geo {province(name:$name) {name {name_en} districts {name {name_en} cities {name {name_en}}}}}}`; - map variables = {"name": name}; + map variables = {"name": name}.cloneReadOnly(); json graphqlResponse = check self.graphqlClient->executeWithType(query, variables); - return check performDataBinding(graphqlResponse, DistrictAndCityByProvinceResponse); + return check performDataBinding(graphqlResponse, DistrictAndCityByProvinceResponse); } }