Changeset 0.9.4 (#54)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user