public async Task <IActionResult> OnPost() { HttpRequests req = new HttpRequests(); PlaceType placetype = new PlaceType() { Name = PlacetypeName }; if (await req.CreatePlaceTypeAsync(placetype, BaseController.GetToken()) != HttpStatusCode.OK) { // Zeig Fehler an } return(RedirectToPage("/PlacetypeSite")); }