Update "User" API

This commit is contained in:
Sébastien André
2020-03-12 17:11:36 +01:00
parent 32a27b6d26
commit ea25a28a78
4 changed files with 39 additions and 9 deletions

View File

@@ -22,11 +22,11 @@ namespace skydiveLogs_api.Controllers
}
// POST: api/User
[HttpPost]
[HttpPost("Authenticate")]
[EnableCors]
public UserResp Authenticate([FromBody] string login, [FromBody] string password)
public UserResp Authenticate([FromBody] UserReq value)
{
var result = _userService.GetByLogin(login, password);
var result = _userService.GetByLogin(value.Login, value.Password);
return _mapper.Map<UserResp>(result);
}

Binary file not shown.