Added some minor tweaks, and set up the EmployeeController to be usable by a frontend to see how well all this works so far.

This commit is contained in:
2021-01-15 14:21:40 -06:00
parent 5a9d3621fe
commit debb4ebc61
4 changed files with 25 additions and 15 deletions
+8 -8
View File
@@ -24,19 +24,19 @@ namespace SecureCore.Controllers
[HttpGet]
public IActionResult Get()
{
//if (Authentication.IsAllowed(HttpContext))
return Ok(DataService.Get());
//else
// return Unauthorized();
if(SessionManager.IsSessionTokenValid(HttpContext))
return Ok(DataService.Get());
else
return Unauthorized();
}
[HttpGet("{id}", Name = "Get")]
public IActionResult Get(int id)
{
//if (Authentication.IsAllowed(HttpContext))
return Ok(DataService.GetById(id));
//else
// return Unauthorized();
if (SessionManager.IsSessionTokenValid(HttpContext))
return Ok(DataService.GetById(id));
else
return Unauthorized();
}
}