public async Task <IActionResult> CreateNewBusiness([FromBody] CreateNewBusinessCommand command)
        {
            command.UserId = ReadJwtToken.GetUser(HttpContext);
            var response = await mediator.Send(command);

            return(Ok(response));
        }
Example #2
0
        public async Task <IActionResult> GetMenus(Guid?productId)
        {
            var command = new GetMenusByUsersCommand()
            {
                UserId    = ReadJwtToken.GetUser(HttpContext),
                ProductId = productId
            };
            var response = await mediator.Send(command);

            return(Ok(response));
        }
 public async Task UpdateProducts([FromBody] ProductByBusinessCommand command)
 {
     command.UserId = ReadJwtToken.GetUser(HttpContext);
     await mediator.Send(command);
 }
 public async Task DeActivate([FromBody] DeActivateBusinessCommand command)
 {
     command.UserId = ReadJwtToken.GetUser(HttpContext);
     await mediator.Send(command);
 }