Ejemplo n.º 1
0
        public IActionResult Reward(int teamId, [FromHeader] string difficulty, [FromHeader] string gotIngredient, [FromHeader] string answer, [FromBody] List <string> missingIngredients)
        {
            bool b_answer;
            bool b_gotIngredient;

            if (answer == "true")
            {
                b_answer = true;
            }
            else
            {
                b_answer = false;
            }
            if (gotIngredient == "true")
            {
                b_gotIngredient = true;
            }
            else
            {
                b_gotIngredient = false;
            }
            Team team = rewardService.Reward(teamId, difficulty, b_answer, b_gotIngredient, missingIngredients);

            if (team != null)
            {
                return(Ok(team));
            }
            return(NotFound());
        }