mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-01 03:56:38 +08:00
初始化
初始化项目
This commit is contained in:
@@ -20,9 +20,6 @@ func Register(r *gin.Engine, cfg *config.Config, log *zap.Logger, svc *service.C
|
||||
api.GET("/version", versionInfo)
|
||||
api.GET("/public/ui-config", publicUIConfigHandler(svc))
|
||||
|
||||
// Telegram Bot webhook — called by Telegram servers, no auth.
|
||||
api.POST("/telegram/webhook", telegramWebhookHandler(svc))
|
||||
|
||||
registerPublicAuthRoutes(api, svc, log)
|
||||
|
||||
registerAuthenticatedRoutes(api, cfg, svc)
|
||||
@@ -90,42 +87,6 @@ func testApiConfigHandler(svc *service.Container) gin.HandlerFunc {
|
||||
return h.TestApiConfig
|
||||
}
|
||||
|
||||
// ─── Download Client Handler 包装 ─────────────────────────────────────────────
|
||||
|
||||
func getDownloadClientHandler(svc *service.Container) gin.HandlerFunc {
|
||||
h := NewDownloadClientHandler(svc, svc.Log)
|
||||
return h.Get
|
||||
}
|
||||
|
||||
// ─── Notify Channel Handler 包装 ──────────────────────────────────────────────
|
||||
|
||||
func getNotifyChannelTypesHandler(svc *service.Container) gin.HandlerFunc {
|
||||
h := NewNotifyHandler(svc, svc.Log)
|
||||
return h.GetTypes
|
||||
}
|
||||
|
||||
func getNotifyChannelHandler(svc *service.Container) gin.HandlerFunc {
|
||||
h := NewNotifyHandler(svc, svc.Log)
|
||||
return h.Get
|
||||
}
|
||||
|
||||
// ─── Scheduler Handler 包装 ──────────────────────────────────────────────────
|
||||
|
||||
func schedulerListTasksHandler(svc *service.Container) gin.HandlerFunc {
|
||||
h := NewSchedulerHandler(svc, svc.Log)
|
||||
return h.ListTasks
|
||||
}
|
||||
|
||||
func schedulerRunTaskHandler(svc *service.Container) gin.HandlerFunc {
|
||||
h := NewSchedulerHandler(svc, svc.Log)
|
||||
return h.RunTask
|
||||
}
|
||||
|
||||
func schedulerGetStatusHandler(svc *service.Container) gin.HandlerFunc {
|
||||
h := NewSchedulerHandler(svc, svc.Log)
|
||||
return h.GetStatus
|
||||
}
|
||||
|
||||
// ─── SSE Handler ──────────────────────────────────────────────────────────────
|
||||
|
||||
func sseHandler(svc *service.Container) gin.HandlerFunc {
|
||||
|
||||
Reference in New Issue
Block a user