mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 08:11:10 +00:00
Adds authorization permissions administrator dashboard
This commit is contained in:
1 parent
152cb48050
commit
583b8db865
106 files changed
+5916
-2085
No files matched your search
@@ -8,6 +8,7 @@ using Microsoft.Extensions.Options;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Runtime.CompilerServices;
|
||||
@@ -206,7 +207,12 @@ public class ApiHttpClient : IApiHttpClient
|
||||
string content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
|
||||
// if the response is successful, deserialize the content to TResponse and return it
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
// handle empty content case
|
||||
if (string.IsNullOrEmpty(content))
|
||||
return default!;
|
||||
return JsonSerializer.Deserialize<TResponse>(content, _jsonOptions)!;
|
||||
}
|
||||
else
|
||||
{
|
||||
ProblemDetailsModel? problemDetails = null;
|
||||
|
||||
Reference in new issue
Block a user