1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-13 00:28:10 -05:00

huge commit for webfront facelift

This commit is contained in:
RaidMax
2022-04-19 18:43:58 -05:00
parent 7b78e0803a
commit d5b4c60e5a
105 changed files with 2981 additions and 2545 deletions

View File

@ -19,11 +19,11 @@ namespace WebfrontCore.Controllers
}
[HttpGet]
public async Task<IActionResult> LoginAsync(int clientId, string password)
public async Task<IActionResult> Login(int clientId, string password)
{
if (clientId == 0 || string.IsNullOrEmpty(password))
{
return Unauthorized();
return Unauthorized("Invalid credentials");
}
try
@ -63,20 +63,20 @@ namespace WebfrontCore.Controllers
: HttpContext.Connection.RemoteIpAddress.ToString()
});
return Ok();
return Ok($"Welcome {privilegedClient.Name}. You are now logged in");
}
}
catch (Exception)
{
return Unauthorized();
return Unauthorized("Could not validate credentials");
}
return Unauthorized();
return Unauthorized("Invalid credentials");
}
[HttpGet]
public async Task<IActionResult> LogoutAsync()
public async Task<IActionResult> Logout()
{
if (Authorized)
{