Skip to content

Commit

Permalink
Filter some more URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed Aug 22, 2019
1 parent dd22c88 commit 14154a3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions handlers/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ func (h Backend) Mount(r chi.Router, db *sqlx.DB) {
keyAuth)

a.Get("/", zhttp.Wrap(h.index))
a.Get("/refs", zhttp.Wrap(h.refs))
a.Get("/pages", zhttp.Wrap(h.pages))
a.Get("/settings", zhttp.Wrap(h.settings))
a.Post("/save", zhttp.Wrap(h.save))
a.With(filterLoggedIn).Get("/export/{file}", zhttp.Wrap(h.export))

af := a.With(filterLoggedIn)
af.Get("/refs", zhttp.Wrap(h.refs))
af.Get("/pages", zhttp.Wrap(h.pages))
af.Get("/settings", zhttp.Wrap(h.settings))
af.Post("/save", zhttp.Wrap(h.save))
af.Get("/export/{file}", zhttp.Wrap(h.export))

user{}.mount(a)
}
Expand Down

0 comments on commit 14154a3

Please sign in to comment.