diff --git a/api/avinya_data.bal b/api/avinya_data.bal index e925671..3b585fa 100644 --- a/api/avinya_data.bal +++ b/api/avinya_data.bal @@ -16,7 +16,7 @@ public distinct service class AvinyaTypeData { return self.avinya_type.active; } - resource function get global_type() returns string? { + resource function get global_type() returns string { return self.avinya_type.global_type; } diff --git a/api/organization_data.bal b/api/organization_data.bal index 64f61d7..cb67dea 100644 --- a/api/organization_data.bal +++ b/api/organization_data.bal @@ -101,7 +101,7 @@ public distinct service class OrganizationData { } resource function get people() returns PersonData[]|error? { - // Get list of child organizations + // Get list of people in the organization stream people = db_client->query( `SELECT * FROM avinya_db.person diff --git a/api/types.bal b/api/types.bal index d9b6afb..2f1a768 100644 --- a/api/types.bal +++ b/api/types.bal @@ -57,7 +57,7 @@ public type AvinyaType record{| readonly string record_type = "avinya_type"; int id?; boolean active; - string? global_type; + string global_type; string? name; string? foundation_type; string? focus; diff --git a/db/schema/2-avinya_types.sql b/db/schema/2-avinya_types.sql index ce84967..b2d6f2c 100644 --- a/db/schema/2-avinya_types.sql +++ b/db/schema/2-avinya_types.sql @@ -3,7 +3,13 @@ USE avinya_db; CREATE TABLE IF NOT EXISTS avinya_type ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, active BOOLEAN NOT NULL, - global_type ENUM("Employee", "Customer", "Volunteer", "Applicant", "Organization", "Team") NOT NULL, + global_type ENUM( + "Employee", + "Customer", + "Volunteer", + "Applicant", + "Team" + ) NOT NULL, name VARCHAR(255), foundation_type ENUM( "Executive",