Esempio n. 1
0
        public async Task <IActionResult> AddGamePack([FromBody] GamePack gamePack)
        {
            int authorizedId = User.GetUserId();

            SyncBase answer = await gameService.AddGamePackAsync(authorizedId, gamePack);

            return(Ok(answer));
        }
Esempio n. 2
0
        public async Task <IActionResult> UpdateGame(int gameId)
        {
            string   source   = System.IO.File.ReadAllText("AppData/CardsGames.txt");
            var      parser   = new TextParser(source);
            GamePack gamePack = parser.GetGameObject(gameId);
            SyncBase answer   = await gameService.AddGamePackAsync(122, gamePack);

            return(Ok(gamePack));
        }