Skip to content

Commit

Permalink
Merge pull request #148 from YujithIsura/main
Browse files Browse the repository at this point in the history
build error fixed
  • Loading branch information
YujithIsura authored Aug 19, 2024
2 parents 85e3e7e + 644827e commit e859b66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions api/main.bal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -4782,7 +4781,6 @@ AND p.organization_id IN (
`);
} else {


inventory_data = db_client->query(
`SELECT
I.id,
Expand Down Expand Up @@ -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 = [];
Expand Down Expand Up @@ -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<Inventory, error?> weekly_consumable_summary_data;

Expand Down
8 changes: 4 additions & 4 deletions client/geo_data_client.bal
Original file line number Diff line number Diff line change
@@ -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<anydata> variables = {"name": name};
map<anydata> variables = {"name": name}.cloneReadOnly();
json graphqlResponse = check self.graphqlClient->executeWithType(query, variables);
return <DistrictAndCityByProvinceResponse> check performDataBinding(graphqlResponse, DistrictAndCityByProvinceResponse);
return <DistrictAndCityByProvinceResponse>check performDataBinding(graphqlResponse, DistrictAndCityByProvinceResponse);
}
}

0 comments on commit e859b66

Please sign in to comment.