// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseStaticFiles(); app.UseRouting(); app.UseMvcWithDefaultRoute(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapBlazorHub(); endpoints.MapFallbackToPage("/_Host"); }); InfiniteFlightApiService.Init(); AircraftGuidsService.Init(); }
public async Task <UserStats> GetCreator() { Guid[] ids = { CreatorId }; var res = await InfiniteFlightApiService.GetUserStatsAsync(ids); return(res.FirstOrDefault()); }
public async Task <UserStats> GetUser() { Guid[] ids = { UserId }; return((await InfiniteFlightApiService.GetUserStatsAsync(ids)).FirstOrDefault()); }
public async Task <FlightPlanEntry> GetFlightPlan(Guid sessionId) { var flightPlans = await InfiniteFlightApiService.GetFlightPlansAsync(sessionId); return(flightPlans.FirstOrDefault(p => p.FlightId == FlightId)); }
public async Task <FlightEntry> GetFlight(Guid sessionId) { var flights = await InfiniteFlightApiService.GetFlightsAsync(sessionId); return(flights.FirstOrDefault(f => f.FlightId == FlightId)); }