refactor: remove shutdown button for Docker deployment

Docker 容器化部署是长期运行的服务,移除关闭服务按钮:
- 删除前端 header.ts 中的关闭按钮
- 删除 main.go 中的 /api/shutdown 接口
- 删除 router.go 中的 quit 路由和处理函数

Co-Authored-By: AI
This commit is contained in:
2026-04-09 10:46:29 +08:00
parent d97c0f667d
commit 04e1045c4f
3 changed files with 2 additions and 26 deletions
-8
View File
@@ -7,7 +7,6 @@ import (
"io/fs"
"log"
"net/http"
"os"
"bilidown/internal/router"
"bilidown/internal/util"
@@ -59,13 +58,6 @@ func mustRunServer() {
http.HandleFunc("/api/checkFFmpeg", func(w http.ResponseWriter, r *http.Request) {
util.Res{Success: true, Data: map[string]bool{"available": ffmpegAvailable}}.Write(w)
})
// 添加关闭服务接口
http.HandleFunc("/api/shutdown", func(w http.ResponseWriter, r *http.Request) {
util.Res{Success: true, Message: "Shutting down..."}.Write(w)
go func() {
os.Exit(0)
}()
})
http.Handle("/api/", http.StripPrefix("/api", apiRouter))
// 启动 HTTP 服务器
go func() {