Skip to content

Commit

Permalink
(GH-367) WebHookSettings.GetAllAsync must return PaginatedResponseWit…
Browse files Browse the repository at this point in the history
…hLinks
  • Loading branch information
Jericho committed Jan 23, 2021
1 parent 30c27e7 commit 06eb311
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 @@ -94,9 +94,9 @@ Task<EventWebhookSettings> UpdateEventWebhookSettingsAsync(
/// <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>
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 @@ -164,15 +164,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 06eb311

Please sign in to comment.