Finished adding user support and ability to update specific novels or set your last read chapter
This commit is contained in:
@@ -9,9 +9,11 @@ namespace Treestar.Shared.AccessLayers;
|
||||
public abstract class ApiAccessLayer
|
||||
{
|
||||
private readonly HttpClient _httpClient;
|
||||
private readonly IAccessLayerAuthenticationProvider _authenticationProvider;
|
||||
|
||||
protected ApiAccessLayer(string apiBaseUrl)
|
||||
protected ApiAccessLayer(string apiBaseUrl, IAccessLayerAuthenticationProvider authenticationProvider)
|
||||
{
|
||||
_authenticationProvider = authenticationProvider;
|
||||
var handler = new HttpClientHandler()
|
||||
{
|
||||
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
|
||||
@@ -22,6 +24,7 @@ public abstract class ApiAccessLayer
|
||||
|
||||
private async Task<HttpResponseWrapper> SendRequest(HttpRequestMessage message)
|
||||
{
|
||||
await _authenticationProvider.AddAuthentication(message);
|
||||
var response = await _httpClient.SendAsync(message);
|
||||
return new HttpResponseWrapper()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user