feat(api): add update endpoints for providers and models

Register admin routes to handle updates for providers and models via
their respective handlers.
This commit is contained in:
zenfun
2025-12-15 16:22:54 +08:00
parent ca03ac1b79
commit 51e55cb036

View File

@@ -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)
}