public IList <FlashcardsModel> InitializeQuestions(FlashcardsParameters param) { var questionsIds = GamesService.InitializeGame(param.DictionaryId, param.UserId, GamesEnum.Flashcards, param.MaxNumberOfQuestions); var ids = questionsIds.Select(x => x.TranslationId).ToList(); var translations = GamesService.GetTranslationsById(ids, param.ReverseLangs); return(GetQuestions(translations, questionsIds)); }
public ActionResult InitializeFlashcardsGame([FromBody] FlashcardsParameters param) { AccessGuardian(Roles.AccessUser, param.UserId); return(JsonHelper.Success(FlashcardsService.InitializeQuestions(param))); }