예제 #1
0
        public async Task <IActionResult> CreateMenu([FromBody] CreateMenuRequestModel menuRequest)
        {
            var managementUserId = User.GetManagementUserId();
            var command          = new MenuCreateCommand(menuRequest.Name, menuRequest.CreateDateTime, managementUserId);
            var response         = await _mediator.Send(command);

            return(response.ToActionResult());
        }
예제 #2
0
        public async Task <IActionResult> Post(MenuCreateCommand command)
        {
            var result = await _mediator.Send(command);

            return(Ok(result));
        }