fix: resolve duplicate webdav route definition
All checks were successful
Automated Container Build / build-and-push (push) Successful in 56s

This commit is contained in:
Elijah 2026-05-26 13:39:03 -07:00
parent f69c6d825e
commit a71b8e024a

View file

@ -65,9 +65,6 @@ func main() {
tusHandler := handlers.NewTusHandler(db, cfg)
// WebDAV Handler
webdavHandler := handlers.NewWebDAVHandler(db, cfg, guard)
// Add WebDAV routes
app.All("/webdav/*", guard.Check(), webdavHandler.Handle)
archiveHandler := &handlers.ArchiveHandler{DB: db, Config: cfg}
shareGuard := middleware.NewBruteForceGuard(3, 60)
shareHandler := &handlers.ShareHandler{DB: db, Config: cfg, Guard: shareGuard}
@ -198,6 +195,8 @@ func main() {
protected.Post("/onlyoffice/template", onlyOfficeHandler.CreateFromTemplate)
protected.Post("/onlyoffice/sign", onlyOfficeHandler.SignConfig)
protected.Get("/onlyoffice/files", onlyOfficeHandler.ListOfficeFiles)
protected.Get("/files/folders-tree", fsHandler.GetFolderTree)
@ -232,7 +231,7 @@ func main() {
// WebDAV Endpoint (accepts basic auth OR bearer)
// We use All() because WebDAV uses custom HTTP methods (PROPFIND, MKCOL, LOCK, etc.)
app.All("/webdav/*", webdavHandler.Handle)
app.All("/webdav/*", guard.Check(), webdavHandler.Handle)
// Start server
addr := fmt.Sprintf(":%s", cfg.Port)