Esempio n. 1
0
        public async Task <IActionResult> OnPost()
        {
            HttpRequests req = new HttpRequests();
            object       r   = new
            {
                rating = Rating,
                text   = reviewContent
            };
            HttpStatusCode c = await req.CreateReview(r, Convert.ToInt32(RouteData.Values["id"]), BaseController.GetToken());

            if (c == HttpStatusCode.Created)
            {
                return(RedirectToPage("/PlaceSite", new { id = RouteData.Values["id"] }));
            }
            else
            {
                // Zeige Fehler an
                return(null);
            }
        }