Files
MeBox/internal/handler/routes_authenticated_features.go
truewhile a79bbb80a8 Remove unused recycle bin and add optional local file delete (#26)
Soft-delete restore/purge/list and the recycle_purge job are gone.
Admin delete now removes library index rows, with an optional
delete_files query that also deletes local media + sidecar NFO.
UI copy is renamed from 移入回收站 to 删除, with a confirm checkbox.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: truewhile <truewhile@users.noreply.github.com>
2026-09-03 14:12:52 +08:00

27 lines
989 B
Go

package handler
import (
"github.com/gin-gonic/gin"
"github.com/truewhile/MeBox/internal/middleware"
"github.com/truewhile/MeBox/internal/service"
)
func registerAuthedFileRoutes(authed *gin.RouterGroup, svc *service.Container) {
authed.GET("/files", middleware.AdminRequired(), browseFilesHandler(svc))
authed.POST("/files/folders", middleware.AdminRequired(), createFolderHandler(svc))
authed.PUT("/files/rename", middleware.AdminRequired(), renameFileHandler(svc))
authed.DELETE("/files", middleware.AdminRequired(), deleteFileHandler(svc))
authed.POST("/files/transfer", middleware.AdminRequired(), transferFileHandler(svc))
}
func registerAuthedDLNARoutes(authed *gin.RouterGroup, svc *service.Container) {
authed.GET("/dlna/devices", dlnaListHandler(svc))
authed.POST("/dlna/cast", dlnaCastHandler(svc))
}
func registerAuthedRealtimeRoutes(authed *gin.RouterGroup, svc *service.Container) {
authed.GET("/ws", wsHandler(svc))
authed.GET("/events", sseHandler(svc))
}