feat: template feature

Signed-off-by: Michael Barz <mbarz@owncloud.com>
This commit is contained in:
Michael Barz
2024-10-17 08:47:02 +02:00
parent 392a3de103
commit e40b7240bf
9 changed files with 417 additions and 11 deletions
@@ -182,5 +182,17 @@ func prepareRoutes(r *chi.Mux, options Options) {
})
})
})
r.Route("/templates/{templateID}", func(r chi.Router) {
r.Use(
func(h stdhttp.Handler) stdhttp.Handler {
// authentication and wopi context
return colabmiddleware.WopiContextAuthMiddleware(options.Config, h)
},
colabmiddleware.CollaborationTracingMiddleware,
)
r.Get("/", func(w stdhttp.ResponseWriter, r *stdhttp.Request) {
adapter.GetFile(w, r)
})
})
})
}