public object GetRequestData([FromQuery] TokenQueryModel tokenInfo, [FromQuery] RequestIdentityModel requestIdentity) { var userContext = tokenRepository.ValidateToken(userRepository, tokenInfo.Token); var request = requestRepository.Select(requestIdentity.RequestId); return(RequestModel.Create(request)); }
public object FillRequest([FromQuery] TokenQueryModel tokenInfo, [FromQuery] RequestIdentityModel requestIdentity) { var userContext = tokenRepository.ValidateToken(userRepository, tokenInfo.Token); if (requestRepository.FillRequest(requestIdentity.RequestId)) { return(RequestModel.Create(requestRepository.Select(requestIdentity.RequestId))); } throw new BasicControllerException("Failed to fill request", "failed to fill request"); }