public IActionResult Post([FromBody] string[] parameters) { if (parameters?.Length != 2) { return(BadRequest()); } var users = _db.Employees.Where(u => u.Usersame == parameters[0]); if (!users.Any()) { return(Unauthorized()); } var credentials = _db.UsersAccounts.Where(c => c.EmployeeId == users.First().Id); if (!credentials.Any()) { return(Unauthorized()); } if (AccountUtils.Decrytp(credentials.First().Password) == AccountUtils.Decrytp(parameters[1])) { return(Ok(users.First())); } return(Unauthorized()); }