Merge pull request #128 from aspacca/ISSUE-44

ISSUE-44 delete support
This commit is contained in:
Andrea Spacca
2018-07-01 14:17:11 +02:00
committed by GitHub
3 changed files with 100 additions and 6 deletions

View File

@ -348,6 +348,8 @@ func (s *Server) Run() {
r.HandleFunc("/", s.BasicAuthHandler(http.HandlerFunc(s.putHandler))).Methods("POST")
// r.HandleFunc("/{page}", viewHandler).Methods("GET")
r.HandleFunc("/{token}/{filename}/{deletionToken}", s.deleteHandler).Methods("DELETE")
r.NotFoundHandler = http.HandlerFunc(s.notFoundHandler)
mime.AddExtensionType(".md", "text/x-markdown")