Ejemplo n.º 1
0
        public async Task <IActionResult> RelateDisheDrink(RelateDisheDrinkRequestModel model)
        {
            if (string.IsNullOrEmpty(model.DisheId))
            {
                return(BadRequest());
            }
            if (string.IsNullOrEmpty(model.DrinkId))
            {
                return(BadRequest());
            }

            var result = matrixService.RelateDisheDrink(model.DisheId, model.DrinkId, model.Relation);

            if (!result)
            {
                return(Conflict());
            }

            return(Ok(result));
        }