|
|
|
@@ -16,7 +16,7 @@ public partial class MistoxNet : Node{
|
|
|
|
|
|
|
|
|
|
public async Task<(bool, Account)> TrySession( string UserName, string Password ) {
|
|
|
|
|
using( System.Net.Http.HttpClient client = new System.Net.Http.HttpClient() ) {
|
|
|
|
|
HttpResponseMessage response = await client.PostAsJsonAsync( "https://mistox.net/api/account/session", new Account { UserName = UserName, PasswordHash = Password } );
|
|
|
|
|
HttpResponseMessage response = await client.PostAsJsonAsync( "https://mistox.com/api/account/session", new Account { UserName = UserName, PasswordHash = Password } );
|
|
|
|
|
string result = await response.Content.ReadAsStringAsync();
|
|
|
|
|
Account User = JsonConvert.DeserializeObject<Account>(result);
|
|
|
|
|
if( User != null && string.IsNullOrEmpty( User.Error ) ) {
|
|
|
|
@@ -28,7 +28,7 @@ public partial class MistoxNet : Node{
|
|
|
|
|
|
|
|
|
|
public async Task<(bool, Account)> TryLogin( string UserName, string Password ) {
|
|
|
|
|
using( System.Net.Http.HttpClient client = new System.Net.Http.HttpClient() ) {
|
|
|
|
|
HttpResponseMessage response = await client.PostAsJsonAsync( "https://mistox.net/api/account/login", new Account { UserName = UserName, PasswordHash = Password } );
|
|
|
|
|
HttpResponseMessage response = await client.PostAsJsonAsync( "https://mistox.com/api/account/login", new Account { UserName = UserName, PasswordHash = Password } );
|
|
|
|
|
string result = await response.Content.ReadAsStringAsync();
|
|
|
|
|
Account User = JsonConvert.DeserializeObject<Account>(result);
|
|
|
|
|
if( User != null && string.IsNullOrEmpty( User.Error ) ) {
|
|
|
|
|