public async Task <IActionResult> Authenticate([FromBody] AuthenticationModel auth) { var result = await _studentService.Authenticate(auth); if (result == null) { return(BadRequest(new { error = "Unable to authenticate" })); } return(Ok(result)); }