aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web/routes.go')
-rw-r--r--internal/web/routes.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/web/routes.go b/internal/web/routes.go
index 36ae892..273a832 100644
--- a/internal/web/routes.go
+++ b/internal/web/routes.go
@@ -63,10 +63,11 @@ func (s *Server) rootRoutes() http.Handler {
m.HandleFunc("POST /b/{sub}/design", s.withBlog(s.handleDesign))
m.HandleFunc("POST /b/{sub}/design/preset", s.withBlog(s.handleDesignPreset))
m.HandleFunc("POST /b/{sub}/design/reset", s.withBlog(s.handleDesignReset))
- m.HandleFunc("GET /b/{sub}/images", s.withBlog(s.handleImages))
- m.HandleFunc("POST /b/{sub}/images/upload", s.withBlog(s.handleImageUpload))
- m.HandleFunc("POST /b/{sub}/images/{id}/delete", s.withBlog(s.handleImageDelete))
- // Images live in the blog's database, so dashboard previews on this host go through /b/.
+ m.HandleFunc("GET /b/{sub}/files", s.withBlog(s.handleFiles))
+ m.HandleFunc("POST /b/{sub}/files/upload", s.withBlogFiles(maxUploadFiles, s.handleFileUpload))
+ m.HandleFunc("POST /b/{sub}/files/{id}/rename", s.withBlog(s.handleFileRename))
+ m.HandleFunc("POST /b/{sub}/files/{id}/delete", s.withBlog(s.handleFileDelete))
+ // Files live in the blog's database, so dashboard previews on this host go through /b/.
m.HandleFunc("GET /b/{sub}/media/{id}", s.withBlog(s.handleMedia))
// superadmin
@@ -78,6 +79,7 @@ func (s *Server) rootRoutes() http.Handler {
m.HandleFunc("POST /admin/users/{id}/enable", s.requireAdmin(s.handleAdminSetDisabled(false)))
m.HandleFunc("GET /admin/users/{id}/delete", s.requireAdmin(s.handleAdminDeleteUserConfirm))
m.HandleFunc("POST /admin/users/{id}/delete", s.requireAdmin(s.handleAdminDeleteUser))
+ m.HandleFunc("POST /admin/blogs/{id}/upload-limit", s.requireAdmin(s.handleAdminUploadLimit))
m.HandleFunc("GET /media/{id}", s.hostBlog(s.handleMedia))
m.Handle("GET /static/{file}", s.staticHandler())