mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
Merge branch 'release/custom-0.1.102' into release/custom-0.1.103
# Conflicts: # backend/go.sum
This commit is contained in:
commit
64ba5ac1cc
164 files changed
+15982
-825
No files matched your search
@@ -264,6 +264,8 @@ func registerAccountRoutes(admin *gin.RouterGroup, h *handler.Handlers) {
|
||||
accounts.POST("/today-stats/batch", h.Admin.Account.GetBatchTodayStats)
|
||||
accounts.POST("/:id/clear-rate-limit", h.Admin.Account.ClearRateLimit)
|
||||
accounts.POST("/:id/reset-quota", h.Admin.Account.ResetQuota)
|
||||
accounts.GET("/:id/affinity-clients", h.Admin.Account.GetAffinityClients)
|
||||
accounts.GET("/:id/affinity-details", h.Admin.Account.GetAffinityDetails)
|
||||
accounts.GET("/:id/temp-unschedulable", h.Admin.Account.GetTempUnschedulable)
|
||||
accounts.DELETE("/:id/temp-unschedulable", h.Admin.Account.ClearTempUnschedulable)
|
||||
accounts.POST("/:id/schedulable", h.Admin.Account.SetSchedulable)
|
||||
@@ -414,7 +416,7 @@ func registerSettingsRoutes(admin *gin.RouterGroup, h *handler.Handlers) {
|
||||
// Beta 策略配置
|
||||
adminSettings.GET("/beta-policy", h.Admin.Setting.GetBetaPolicySettings)
|
||||
adminSettings.PUT("/beta-policy", h.Admin.Setting.UpdateBetaPolicySettings)
|
||||
// Sora S3 存储配置
|
||||
// Sora S3 存储配置(旧路由,保留兼容)
|
||||
adminSettings.GET("/sora-s3", h.Admin.Setting.GetSoraS3Settings)
|
||||
adminSettings.PUT("/sora-s3", h.Admin.Setting.UpdateSoraS3Settings)
|
||||
adminSettings.POST("/sora-s3/test", h.Admin.Setting.TestSoraS3Connection)
|
||||
@@ -423,6 +425,22 @@ func registerSettingsRoutes(admin *gin.RouterGroup, h *handler.Handlers) {
|
||||
adminSettings.PUT("/sora-s3/profiles/:profile_id", h.Admin.Setting.UpdateSoraS3Profile)
|
||||
adminSettings.DELETE("/sora-s3/profiles/:profile_id", h.Admin.Setting.DeleteSoraS3Profile)
|
||||
adminSettings.POST("/sora-s3/profiles/:profile_id/activate", h.Admin.Setting.SetActiveSoraS3Profile)
|
||||
// Sora 统一存储配置(新路由,指向相同 handler)
|
||||
adminSettings.GET("/sora-storage", h.Admin.Setting.GetSoraS3Settings)
|
||||
adminSettings.PUT("/sora-storage", h.Admin.Setting.UpdateSoraS3Settings)
|
||||
adminSettings.POST("/sora-storage/test", h.Admin.Setting.TestSoraS3Connection)
|
||||
adminSettings.GET("/sora-storage/profiles", h.Admin.Setting.ListSoraS3Profiles)
|
||||
adminSettings.POST("/sora-storage/profiles", h.Admin.Setting.CreateSoraS3Profile)
|
||||
adminSettings.PUT("/sora-storage/profiles/:profile_id", h.Admin.Setting.UpdateSoraS3Profile)
|
||||
adminSettings.DELETE("/sora-storage/profiles/:profile_id", h.Admin.Setting.DeleteSoraS3Profile)
|
||||
adminSettings.POST("/sora-storage/profiles/:profile_id/activate", h.Admin.Setting.SetActiveSoraS3Profile)
|
||||
// Google Drive OAuth
|
||||
adminSettings.POST("/sora-storage/gdrive-oauth/start", h.Admin.GDriveOAuth.StartOAuth)
|
||||
adminSettings.POST("/sora-storage/gdrive-oauth/callback", h.Admin.GDriveOAuth.OAuthCallback)
|
||||
adminSettings.POST("/sora-storage/gdrive-test", h.Admin.GDriveOAuth.TestGDriveStorage)
|
||||
// Sora 存储统计
|
||||
adminSettings.GET("/sora-storage/gdrive-quota", h.Admin.Setting.GetGDriveQuota)
|
||||
adminSettings.GET("/sora-storage/video-stats", h.Admin.Setting.GetStorageVideoStats)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -144,6 +144,16 @@ func RegisterGatewayRoutes(
|
||||
{
|
||||
soraV1.POST("/chat/completions", h.SoraGateway.ChatCompletions)
|
||||
soraV1.GET("/models", h.Gateway.Models)
|
||||
|
||||
// Sora Videos/Images async task API
|
||||
if h.SoraVideos != nil {
|
||||
soraV1.POST("/videos", h.SoraVideos.CreateVideo)
|
||||
soraV1.GET("/videos/:id", h.SoraVideos.GetVideo)
|
||||
soraV1.POST("/videos/:id/remix", h.SoraVideos.RemixVideo)
|
||||
soraV1.GET("/videos/:id/content", h.SoraVideos.GetVideoContent)
|
||||
soraV1.POST("/images/generations", h.SoraVideos.CreateImage)
|
||||
soraV1.POST("/images/edits", h.SoraVideos.EditImage)
|
||||
}
|
||||
}
|
||||
|
||||
// Sora 媒体代理(可选 API Key 验证)
|
||||
|
||||
Reference in new issue
Block a user