Switched to net9 and finished event workflow

This commit is contained in:
2026-01-18 19:30:20 +01:00
parent 8d0573eb7e
commit 2d3c973d47
23 changed files with 142 additions and 40 deletions

View File

@@ -1,4 +1,3 @@
using HopFrame.Core.Callbacks;
using HopFrame.Core.Services;
using HopFrame.Web;
using Microsoft.EntityFrameworkCore;
@@ -9,6 +8,8 @@ using SpotiParty.Web.Services;
var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddEnvironmentVariables();
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
@@ -44,16 +45,15 @@ builder.Services.AddHopFrame(config => {
.List(false)
.DisplayValue(false)
.SetEditable(false);
table.ShowSearchSuggestions(false);
});
context.Table<Event>()
.SetDisplayName(Guid.NewGuid().ToString())
.Ignore(true);
});
config.AddCustomRepository<EventsDashboardRepo, Event, Guid>(e => e.Id, table => {
//table.SetDisplayName("Events");
table.SetDisplayName("Events");
table.Property(e => e.Id)
.List(false)
@@ -61,18 +61,15 @@ builder.Services.AddHopFrame(config => {
.SetCreatable(false);
table.Property(e => e.Host)
.List(false)
.SetEditable(false)
.SetCreatable(false)
.SetDisplayedProperty(u => u.DisplayName);
table.ShowSearchSuggestions(false);
table.AddCallbackHandler(CallbackType.CreateEntry, async (entry, services) => {
var auth = services.GetRequiredService<DashboardAuthHandler>();
var user = await auth.GetCurrentUser();
entry.Host = user!;
});
});
config.AddPlugin<AdminDashboardPlugin>();
});
var app = builder.Build();
@@ -91,7 +88,7 @@ await using (var scope = app.Services.CreateAsyncScope()) {
app.MapDefaultEndpoints();
app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true);
app.UseStatusCodePagesWithReExecute("/not-found");
//app.UseHttpsRedirection();
app.UseAntiforgery();