Browse Source

调整接口,删除不用的接口

Signed-off-by: allan716 <[email protected]>
allan716 3 years ago
parent
commit
f09a8bf5b0
2 changed files with 3 additions and 9 deletions
  1. 1 1
      cmd/chinesesubfinder/main.go
  2. 2 8
      internal/backend/base_router.go

+ 1 - 1
cmd/chinesesubfinder/main.go

@@ -125,7 +125,7 @@ func main() {
 		common.SetApiToken("")
 	}
 	// 是否开启开发模式,跳过某些流程
-	settings.Get().SpeedDevMode = true
+	settings.Get().SpeedDevMode = false
 	err := settings.Get().Save()
 	if err != nil {
 		loggerBase.Panicln("settings.Get().Save() err:", err)

+ 2 - 8
internal/backend/base_router.go

@@ -86,9 +86,6 @@ func InitRouter(
 	// v1路由: /v1/xxx
 	GroupV1 := router.Group("/" + cbV1.GetVersion())
 	{
-		GroupV1.GET("/preview/playlist/:videofpathbase64", cbV1.HlsPlaylist)
-		GroupV1.GET("/preview/segments/:resolution/:segment/:videofpathbase64", cbV1.HlsSegment)
-
 		GroupV1.Use(middle.CheckAuth())
 
 		GroupV1.GET("/settings", cbV1.SettingsHandler)
@@ -122,12 +119,9 @@ func InitRouter(
 		GroupV1.GET("/subtitles/list_manual_upload_2_local_job", cbV1.ListManualUploadSubtitle2LocalJob)
 		GroupV1.POST("/subtitles/is_manual_upload_2_local_in_queue", cbV1.IsManualUploadSubtitle2LocalJobInQueue)
 
-		GroupV1.POST("/preview/add", cbV1.PreviewAdd)
-		GroupV1.GET("/preview/list", cbV1.PreviewList)
-		GroupV1.POST("/preview/is_in_queue", cbV1.PreviewIsJobInQueue)
-		GroupV1.POST("/preview/job_result", cbV1.PreviewJobResult)
-		GroupV1.POST("/preview/export_info", cbV1.PreviewGetExportInfo)
 		GroupV1.POST("/preview/clean_up", cbV1.PreviewCleanUp)
+		GroupV1.GET("/preview/playlist/:videofpathbase64", cbV1.HlsPlaylist)
+		GroupV1.GET("/preview/segments/:resolution/:segment/:videofpathbase64", cbV1.HlsSegment)
 
 	}