Serverseitige Profilbilder u. Datenverwaltung auf dem Serve
-4 stunden meines lebens
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user