Serverseitige Profilbilder u. Datenverwaltung auf dem Serve

-4 stunden meines lebens
This commit is contained in:
DaddyPig
2024-07-02 22:40:43 +02:00
parent 891f3f9e87
commit 28460e3312
10 changed files with 58 additions and 10 deletions

View File

@@ -23,7 +23,7 @@ namespace bib_talk.Repository
{
string username = loginWindow.usernbox.Text;
string password = loginWindow.passwordbox.Password;
var loginData = new { Username = username, Password = password, Email = "", Birthday = "", IsOnline = "" };
var loginData = new { Username = username, Password = password, Email = "", Birthday = "", IsOnline = ""};
string json = JsonConvert.SerializeObject(loginData);
using (var client = new HttpClient())

View File

@@ -1,6 +1,7 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Text;
@@ -71,12 +72,18 @@ namespace bib_talk.Repository
if (response.IsSuccessStatusCode)
{
var responseContent = await response.Content.ReadAsStringAsync();
var onlineUsers = JsonConvert.DeserializeObject<List<User>>(responseContent);
mainWindow.onlineUsersListBox.ItemsSource = onlineUsers;
}
}
}
public async void LogoutUser()
{
using (var client = new HttpClient())