mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-14 00:34:14 +01:00
fix connection for registration maybe
This commit is contained in:
parent
7a509fb608
commit
25356c60a4
1 changed files with 7 additions and 5 deletions
|
|
@ -20,7 +20,8 @@ namespace MareSynchronos.WebAPI
|
||||||
Disconnected,
|
Disconnected,
|
||||||
Connected,
|
Connected,
|
||||||
Unauthorized,
|
Unauthorized,
|
||||||
VersionMisMatch
|
VersionMisMatch,
|
||||||
|
NoAccount
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class ApiController : IDisposable
|
public partial class ApiController : IDisposable
|
||||||
|
|
@ -134,12 +135,13 @@ namespace MareSynchronos.WebAPI
|
||||||
return ServerState.Disconnected;
|
return ServerState.Disconnected;
|
||||||
if (!ServerAlive)
|
if (!ServerAlive)
|
||||||
return ServerState.Offline;
|
return ServerState.Offline;
|
||||||
|
if (ServerAlive && SupportedServerVersions.Contains(_connectionDto?.ServerVersion ?? 0) && string.IsNullOrEmpty(UID))
|
||||||
|
return ServerState.Unauthorized;
|
||||||
if (ServerAlive && !SupportedServerVersions.Contains(_connectionDto?.ServerVersion ?? 0) && !string.IsNullOrEmpty(UID))
|
if (ServerAlive && !SupportedServerVersions.Contains(_connectionDto?.ServerVersion ?? 0) && !string.IsNullOrEmpty(UID))
|
||||||
return ServerState.VersionMisMatch;
|
return ServerState.VersionMisMatch;
|
||||||
if (ServerAlive && SupportedServerVersions.Contains(_connectionDto?.ServerVersion ?? 0)
|
if (ServerAlive && SupportedServerVersions.Contains(_connectionDto?.ServerVersion ?? 0) && !string.IsNullOrEmpty(UID))
|
||||||
&& string.IsNullOrEmpty(UID))
|
|
||||||
return ServerState.Unauthorized;
|
|
||||||
return ServerState.Connected;
|
return ServerState.Connected;
|
||||||
|
return ServerState.NoAccount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue