ISSUE-44 delete support

This commit is contained in:
Andrea Spacca
2018-06-24 06:46:57 +02:00
parent 8a0e3d39f2
commit 0c9c6e3424
3 changed files with 100 additions and 6 deletions

View File

@ -323,6 +323,8 @@ func (s *Server) Run() {
r.HandleFunc("/", s.postHandler).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")