fixes a 500 in prod and the associated test
This commit is contained in:
parent
8f91cbed02
commit
b82b6722c7
3 changed files with 20 additions and 15 deletions
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Yavsc.Abstract.BlogSpot;
|
||||
using Yavsc.Abstract.Identity.Security;
|
||||
using Yavsc.Api.Client.Dtos;
|
||||
|
||||
|
|
@ -33,16 +34,16 @@ public sealed class BlogAclApiClient
|
|||
api.Http.BaseAddress = new Uri(blogsBaseAddress);
|
||||
}
|
||||
|
||||
public Task<List<CircleAuthorization>> GetMyAclAsync(CancellationToken ct = default)
|
||||
=> _api.CallAsync<List<CircleAuthorization>>(HttpMethod.Get, Path, ct: ct);
|
||||
public Task<List<PostAccessControlRulePayload>> GetMyAclAsync(CancellationToken ct = default)
|
||||
=> _api.CallAsync<List<PostAccessControlRulePayload>>(HttpMethod.Get, Path, ct: ct);
|
||||
|
||||
public Task<CircleAuthorization?> GetAclAsync(long circleId, CancellationToken ct = default)
|
||||
=> _api.CallAsync<CircleAuthorization?>(HttpMethod.Get, $"{Path}/{circleId}", ct: ct);
|
||||
public Task<PostAccessControlRulePayload?> GetAclAsync(long circleId, CancellationToken ct = default)
|
||||
=> _api.CallAsync<PostAccessControlRulePayload?>(HttpMethod.Get, $"{Path}/{circleId}", ct: ct);
|
||||
|
||||
public Task<CircleAuthorization?> GrantAsync(CircleAuthorization acl, CancellationToken ct = default)
|
||||
=> _api.CallAsync<CircleAuthorization?>(HttpMethod.Post, Path, body: acl, ct: ct);
|
||||
public Task<PostAccessControlRulePayload?> GrantAsync(PostAccessControlRulePayload acl, CancellationToken ct = default)
|
||||
=> _api.CallAsync<PostAccessControlRulePayload?>(HttpMethod.Post, Path, body: acl, ct: ct);
|
||||
|
||||
public Task UpdateAclAsync(long circleId, CircleAuthorization acl, CancellationToken ct = default)
|
||||
public Task UpdateAclAsync(long circleId, PostAccessControlRulePayload acl, CancellationToken ct = default)
|
||||
=> _api.CallAsync(HttpMethod.Put, $"{Path}/{circleId}", body: acl, ct: ct);
|
||||
|
||||
public Task RevokeAsync(long circleId, CancellationToken ct = default)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue