コード例 #1
0
        public async Task Handle(UpdateExpertAreas message, IMessageHandlerContext context)
        {
            Data.TransactionHash = message.TransactionHash;

            var expert = await _expertService.GetByAddressAsync(message.ExpertAddress);

            Data.ExpertId = expert.UserId;

            await _transactionService.StartAsync(message.TransactionHash, message.UserId, EthereumTransactionEntityType.Expert, expert.UserId, EthereumTransactionType.UpdateExpertAreas);

            await context.SendLocal(new WaitForTransaction { TransactionHash = message.TransactionHash });
        }
コード例 #2
0
        public async Task <IActionResult> UpdateExpertAreasAsync([FromBody] AdminExpertUpdateAreasRequest request)
        {
            var message = new UpdateExpertAreas
            {
                ExpertAddress   = request.Address,
                TransactionHash = request.TransactionHash,
                UserId          = User.GetUserId()
            };

            await _messageSession.SendLocal(message);

            return(NoContent());
        }