Skip to content

Commit

Permalink
feat: WR-940 add filter to ChangeFeed
Browse files Browse the repository at this point in the history
  • Loading branch information
rikdepeuter authored and ArneD committed Feb 23, 2024
1 parent 90a9d3c commit 1539c5c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Public.Api/Road/Changes/ChangeFeedController-GetHead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ public partial class ChangeFeedController
[HttpGet("wegen/activiteit/begin", Name = nameof(GetHead))]
public async Task<IActionResult> GetHead(
[FromQuery] int? maxEntryCount,
[FromQuery] string? filter,
[FromServices] ProblemDetailsHelper problemDetailsHelper,
CancellationToken cancellationToken = default)
{
RestRequest BackendRequest() =>
CreateBackendRestRequest(Method.Get, "changefeed/head")
.AddParameter(nameof(maxEntryCount), maxEntryCount, ParameterType.QueryString);
.AddParameter(nameof(maxEntryCount), maxEntryCount, ParameterType.QueryString)
.AddParameter(nameof(filter), filter, ParameterType.QueryString);

var response = await GetFromBackendWithBadRequestAsync(
AcceptType.Json,
Expand Down
4 changes: 3 additions & 1 deletion src/Public.Api/Road/Changes/ChangeFeedController-GetNext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ public partial class ChangeFeedController
public async Task<IActionResult> GetNext(
[FromQuery] long? afterEntry,
[FromQuery] int? maxEntryCount,
[FromQuery] string? filter,
[FromServices] ProblemDetailsHelper problemDetailsHelper,
CancellationToken cancellationToken = default)
{
RestRequest BackendRequest() =>
CreateBackendRestRequest(Method.Get, "changefeed/next")
.AddParameter(nameof(maxEntryCount), maxEntryCount, ParameterType.QueryString)
.AddParameter(nameof(afterEntry), afterEntry, ParameterType.QueryString);
.AddParameter(nameof(afterEntry), afterEntry, ParameterType.QueryString)
.AddParameter(nameof(filter), filter, ParameterType.QueryString);

var response = await GetFromBackendWithBadRequestAsync(
AcceptType.Json,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ public partial class ChangeFeedController
public async Task<IActionResult> GetPrevious(
[FromQuery] long? beforeEntry,
[FromQuery] int? maxEntryCount,
[FromQuery] string? filter,
[FromServices] ProblemDetailsHelper problemDetailsHelper,
CancellationToken cancellationToken = default)
{
RestRequest BackendRequest() =>
CreateBackendRestRequest(Method.Get, "changefeed/previous")
.AddParameter(nameof(maxEntryCount), maxEntryCount, ParameterType.QueryString)
.AddParameter(nameof(beforeEntry), beforeEntry, ParameterType.QueryString);
.AddParameter(nameof(beforeEntry), beforeEntry, ParameterType.QueryString)
.AddParameter(nameof(filter), filter, ParameterType.QueryString);

var response = await GetFromBackendWithBadRequestAsync(
AcceptType.Json,
Expand Down

0 comments on commit 1539c5c

Please sign in to comment.