public async Task <IActionResult> Authenticate([FromBody] AuthenticateModel model) { var user = await _nodeService.Authenticate(model.NodeName, model.MacAddress); if (user == null) { return(BadRequest(new { message = "Username or password is incorrect" })); } return(Ok(user)); }