Skip to content

Commit

Permalink
field types adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyziggy committed Mar 13, 2024
1 parent c7106db commit d654b30
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions FunctionApp/SharePoint/ListData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task<IActionResult> GetCompanies(
[FunctionName("GetEmployees")]
public async Task<IActionResult> GetEmployees(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "all-companies/{companyId}/employees")] HttpRequest req,
string companyId, ILogger log)
string company, ILogger log)
{
log.LogInformation("Employees list is requested.");

Expand All @@ -61,7 +61,7 @@ public async Task<IActionResult> GetEmployees(
{
new("select", "id"),
new("expand", "fields(select=Title,CSCS)"),
new("filter", $"fields/CompanyLookupId eq '{companyId}'"),
new("filter", $"fields/Company eq '{company}'"),
new("orderby", "fields/Title")
}));
}
Expand All @@ -82,7 +82,7 @@ public async Task<IActionResult> GetSignedInCompanies(
var listItems = await list.GetListItems(new List<QueryOption>
{
new("select", "id"),
new("expand", "fields(select=Company,CompanyLookupId)"),
new("expand", "fields(select=Company)"),
new("filter", $"fields/Site eq '{siteName}' and fields/CurrentStatus eq 'In'"),
new("orderby", "fields/Company")
});
Expand All @@ -96,7 +96,7 @@ public async Task<IActionResult> GetSignedInCompanies(
[FunctionName("GetSignedInEmployees")]
public async Task<IActionResult> GetSignedInEmployees(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "sites/{siteName}/companies/{companyId}/signed-in-employees")] HttpRequest req,
string siteName, string companyId, ILogger log)
string siteName, string company, ILogger log)
{
log.LogInformation("Signed In employees list is requested.");

Expand All @@ -108,7 +108,7 @@ public async Task<IActionResult> GetSignedInEmployees(
new("select", "id"),
new("expand", "fields(select=Title)"),
new("filter",
$"fields/Site eq '{siteName}' and fields/CompanyLookupId eq '{companyId}' and fields/CurrentStatus eq 'In'"),
$"fields/Site eq '{siteName}' and fields/Company eq '{company}' and fields/CurrentStatus eq 'In'"),
new("orderby", "fields/Title")
});

Expand Down

0 comments on commit d654b30

Please sign in to comment.