Exemple #1
0
        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));
        }
Exemple #2
0
        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");
        }