Beispiel #1
0
        public async Task <IActionResult> AddLackSelfControlDish(CreateUpdateLackControlDishRequest request)
        {
            var loggedUser = User.GetUserIdFromToken();
            var result     = await _dishService.AddOrUpdateLackselfControlDishAsync(loggedUser, request.DishId, request.Intensity);

            var language = await _userService.GetUserLanguageFromUserIdAsync(loggedUser);

            var mapped = _mapper.Map <DishResponse>(result, opt =>
            {
                opt.Items["lang"] = language;
            });

            return(Created("", new ApiOkResponse(mapped)));
        }