1.0.4
This commit is contained in:
@@ -8,7 +8,7 @@ using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
namespace Jugenddienst_Stunden.Models;
|
||||
|
||||
class Auth {
|
||||
public static async Task<string> GetApiDataWithAuthAsync(string url, string token) {
|
||||
public static async Task<string?> GetApiDataWithAuthAsync(string url, string token) {
|
||||
// Erstellen eines HttpClient-Objekts
|
||||
using (HttpClient client = new HttpClient() { Timeout = TimeSpan.FromSeconds(15) }) {
|
||||
|
||||
@@ -62,7 +62,7 @@ class Auth {
|
||||
string json = JsonSerializer.Serialize<DayTime>(item);
|
||||
StringContent content = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
|
||||
HttpResponseMessage response = null;
|
||||
HttpResponseMessage? response = null;
|
||||
if (isNewItem)
|
||||
response = await client.PostAsync(url, content);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user