From 51e55cb0360e416ff3abcbed75ecf770db3372d3 Mon Sep 17 00:00:00 2001 From: zenfun Date: Mon, 15 Dec 2025 16:22:54 +0800 Subject: [PATCH] feat(api): add update endpoints for providers and models Register admin routes to handle updates for providers and models via their respective handlers. --- cmd/server/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/server/main.go b/cmd/server/main.go index 6e0d7c1..ba765f5 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -163,8 +163,10 @@ func main() { adminGroup.PUT("/features", featureHandler.UpdateFeatures) // Other admin routes for managing providers, models, etc. adminGroup.POST("/providers", handler.CreateProvider) + adminGroup.PUT("/providers/:id", handler.UpdateProvider) adminGroup.POST("/models", handler.CreateModel) adminGroup.GET("/models", handler.ListModels) + adminGroup.PUT("/models/:id", handler.UpdateModel) adminGroup.POST("/sync/snapshot", handler.SyncSnapshot) }