Esempio n. 1
0
        public async Task <IActionResult> ApproveRequestToChef([FromBody] Request request)
        {
            if (request.RequestType == RequestType.Upgrade_To_Chef)
            {
                await _moderationService.ApproveRequest(request);

                await _messagePublisher.PublishMessageAsync("UserRoleUpdated", new { request.UserId, Role = 1 });

                return(Ok());
            }

            return(BadRequest());
        }