Changeset 0.9.4 (#54)

This commit is contained in:
2026-02-24 10:44:12 +00:00
parent 90021157e6
commit 5e416d3726
26 changed files with 1333 additions and 108 deletions

View File

@@ -46,13 +46,13 @@ func setupHarness(t *testing.T) *testHarness {
api := r.Group("/api/v1")
// Auth (unprotected)
auth := NewAuthHandler(cfg, stores)
auth := NewAuthHandler(cfg, stores, nil)
authGroup := api.Group("/auth")
authGroup.POST("/register", auth.Register)
authGroup.POST("/login", auth.Login)
// Public settings
adm := NewAdminHandler(stores)
adm := NewAdminHandler(stores, nil)
api.GET("/settings/public", adm.PublicSettings)
// Protected routes
@@ -70,7 +70,7 @@ func setupHarness(t *testing.T) *testHarness {
protected.POST("/models/preferences/bulk", modelPrefs.BulkSetPreferences)
// User providers
provCfg := NewProviderConfigHandler(stores)
provCfg := NewProviderConfigHandler(stores, nil)
protected.GET("/api-configs", provCfg.ListConfigs)
protected.POST("/api-configs", provCfg.CreateConfig)
protected.GET("/api-configs/:id", provCfg.GetConfig)
@@ -80,7 +80,7 @@ func setupHarness(t *testing.T) *testHarness {
protected.POST("/api-configs/:id/models/fetch", provCfg.FetchModels)
// Team self-service (same route group as production)
teams := NewTeamHandler()
teams := NewTeamHandler(nil)
protected.GET("/teams/mine", teams.MyTeams)
teamScoped := protected.Group("/teams/:teamId")
@@ -116,7 +116,7 @@ func setupHarness(t *testing.T) *testHarness {
protected.POST("/channels", channels.CreateChannel)
// Completions
completions := NewCompletionHandler()
completions := NewCompletionHandler(nil)
protected.POST("/chat/completions", completions.Complete)
// Admin routes