public IActionResult GetImage(int index) { var playerInfo = Utils.CookieUtils.GetPlayerInfoFromRequest(Request); var image = ImageStorage.GetImage(index); return(Ok(image)); }
public IActionResult PostGuess(int id, Guess guess) { var playerInfo = Utils.CookieUtils.GetPlayerInfoFromRequest(Request); var imageModel = new Image { ImageData = ImageStorage.GetImage(id), Player = guess.Player }; var guessModel = new Guess { GuessData = guess.GuessData, Player = guess.Player }; var drawingModel = new Drawing { Guess = guessModel, Image = imageModel }; DrawingStorage.AddDrawing(drawingModel); return(Ok()); }