Initial onlyoffice integration, sidebar changes
Some checks failed
Automated Container Build / build-and-push (push) Failing after 28s

This commit is contained in:
Elijah 2026-05-24 10:46:27 -07:00
parent 4110657557
commit d80e31e7f5
7 changed files with 504 additions and 12 deletions

View file

@ -69,6 +69,7 @@ func main() {
archiveHandler := &handlers.ArchiveHandler{DB: db, Config: cfg}
shareGuard := middleware.NewBruteForceGuard(3, 60)
shareHandler := &handlers.ShareHandler{DB: db, Config: cfg, Guard: shareGuard}
onlyOfficeHandler := &handlers.OnlyOfficeHandler{Config: cfg}
// Initialize background workers
workers.InitTaskManager(cfg)
@ -135,6 +136,9 @@ func main() {
public.Post("/share/:id", shareGuard.Check(), shareHandler.GetPublicShare)
public.Get("/download/:id", shareHandler.DownloadPublicShare)
// OnlyOffice callback (public but validates query token)
public.Post("/onlyoffice/callback", onlyOfficeHandler.Callback)
// Auth routes (with brute force protection)
auth := app.Group("/api/auth")
auth.Post("/login", guard.Check(), authHandler.Login)
@ -184,6 +188,9 @@ func main() {
protected.Post("/files/upload", fsHandler.Upload)
protected.Post("/files/check-conflicts", fsHandler.CheckConflicts)
// OnlyOffice blanks
protected.Post("/onlyoffice/create", onlyOfficeHandler.CreateBlank)
protected.Get("/files/folders-tree", fsHandler.GetFolderTree)
// File listing and download (with path jail)