Return all users with profiles (#3)

Also fixed server pre-rendering and added log off functionality
This commit is contained in:
2021-01-10 22:06:26 -05:00
parent 0446098e09
commit 15c1a3ff2c
18 changed files with 270 additions and 52 deletions

View File

@@ -3,8 +3,6 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.ResponseCompression;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@@ -35,7 +33,9 @@ namespace JobsJobsJobs.Server
services.AddDbContext<JobsDbContext>(options =>
{
options.UseNpgsql(Configuration.GetConnectionString("JobsDb"), o => o.UseNodaTime());
// options.LogTo(System.Console.WriteLine, Microsoft.Extensions.Logging.LogLevel.Information);
#if DEBUG
options.LogTo(System.Console.WriteLine, Microsoft.Extensions.Logging.LogLevel.Information);
#endif
});
services.AddSingleton<IClock>(SystemClock.Instance);
services.AddLogging();
@@ -98,7 +98,7 @@ namespace JobsJobsJobs.Server
endpoints.MapRazorPages();
endpoints.MapControllers();
endpoints.MapFallback("api/{**slug}", send404);
endpoints.MapFallbackToFile("{**slug}", "index.html");
endpoints.MapFallbackToPage("{**slug}", "/_Host");
});
}
}