Skip to content

Commit

Permalink
(GH-367) WebHookSettings.GetAllAsync must return PaginatedResponseWi…
Browse files Browse the repository at this point in the history
…thLinks
  • Loading branch information
Jericho committed Aug 4, 2024
1 parent 7efeb55 commit d61c939
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Source/StrongGrid/Resources/IWebhookSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ Task<EventWebhookSettings> UpdateEventWebhookSettingsAsync(
/// <param name="onBehalfOf">The user to impersonate.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="InboundParseWebhookSettings" />.
/// The <see cref="PaginatedResponseWithLinks{InboundParseWebhookSettings}" />.
/// </returns>
Task<InboundParseWebhookSettings[]> GetAllInboundParseWebhookSettingsAsync(string onBehalfOf = null, CancellationToken cancellationToken = default);
Task<PaginatedResponseWithLinks<InboundParseWebhookSettings>> GetAllInboundParseWebhookSettingsAsync(string onBehalfOf = null, CancellationToken cancellationToken = default);

/// <summary>
/// Get the inbound parse webhook settings for a specific hostname.
Expand Down
6 changes: 3 additions & 3 deletions Source/StrongGrid/Resources/WebhookSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,15 @@ public Task<InboundParseWebhookSettings> CreateInboundParseWebhookSettingsAsync(
/// <param name="onBehalfOf">The user to impersonate.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The <see cref="InboundParseWebhookSettings" />.
/// The <see cref="PaginatedResponseWithLinks{InboundParseWebhookSettings}" />.
/// </returns>
public Task<InboundParseWebhookSettings[]> GetAllInboundParseWebhookSettingsAsync(string onBehalfOf = null, CancellationToken cancellationToken = default)
public Task<PaginatedResponseWithLinks<InboundParseWebhookSettings>> GetAllInboundParseWebhookSettingsAsync(string onBehalfOf = null, CancellationToken cancellationToken = default)
{
return _client
.GetAsync($"{_inboundParseWebhookEndpoint}/settings")
.OnBehalfOf(onBehalfOf)
.WithCancellationToken(cancellationToken)
.AsObject<InboundParseWebhookSettings[]>("result");
.AsPaginatedResponseWithLinks<InboundParseWebhookSettings>("result");
}

/// <summary>
Expand Down

0 comments on commit d61c939

Please sign in to comment.