Esempio n. 1
0
        public async Task <EmptyResponse> AcceptAsync([FromBody] AcceptRejectOfferRequest request)
        {
            await _ethereumClient.WaitForConfirmationAsync(request.TransactionHash);

            await _scoringService.AcceptOfferAsync(request.ScoringId, request.AreaId, User.GetUserId());

            return(new EmptyResponse());
        }
Esempio n. 2
0
        public async Task <IActionResult> Post([FromBody] AdminRequest request)
        {
            await _ethereumClient.WaitForConfirmationAsync(request.TransactionHash);

            await _adminService.AddAsync(request.Address);

            return(NoContent());
        }
        public async Task <IActionResult> SubmitAsync([FromBody] SubmitEstimateRequest request)
        {
            await _ethereumClient.WaitForConfirmationAsync(request.TransactionHash);

            await _estimationService.SubmitEstimatesAsync(User.GetUserId(), request);

            return(NoContent());
        }
Esempio n. 4
0
        public async Task <EmptyResponse> AcceptAsync(long id, [FromBody] AcceptApplicationRequest request)
        {
            await _ethereumClient.WaitForConfirmationAsync(request.TransactionHash);

            if (request.Areas.Count == 0)
            {
                throw new AppErrorException(ErrorCode.ShouldCheckAreasToAccept);
            }

            await _expertService.AcceptApplicationAsync(id, request.Areas);

            return(new EmptyResponse());
        }