aboutsummaryrefslogtreecommitdiff
path: root/save.go
diff options
context:
space:
mode:
Diffstat (limited to 'save.go')
-rw-r--r--save.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/save.go b/save.go
deleted file mode 100644
index 68ac700..0000000
--- a/save.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package main
-
-import "net/http"
-
-func init() {
- http.HandleFunc("/save/", saveHandler)
-}
-
-func saveHandler(w http.ResponseWriter, r *http.Request) {
- title := r.URL.Path[len("/save/"):]
- p := &Page{Title: title, Body: []byte(r.FormValue("body"))}
- if err := p.save(); err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
- http.Redirect(w, r, "/view/"+title, http.StatusFound)
-}