summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-11-01 15:58:58 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-11-01 15:58:58 -0400
commitd004e380bcbcfcc49da2a23d2da48f4c327aa0ff (patch)
tree3abf648c0e132414ede9aae94bac4c852f1cd7ca
parent4866ad0f7e809e8c7e7a94fd98d83cf85ca3735b (diff)
read PUT body
-rw-r--r--src/edit/dir.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/edit/dir.go b/src/edit/dir.go
index bc6ef6c..c1e7cca 100644
--- a/src/edit/dir.go
+++ b/src/edit/dir.go
@@ -3,6 +3,7 @@ package main
import (
"fmt"
"time"
+ "io/ioutil"
"net/http"
"path"
"strings"
@@ -52,7 +53,8 @@ func ServeGit(out http.ResponseWriter, in *http.Request) {
if msg == "" {
msg = fmt.Sprintf("web edit: create/modify %q", upath)
}
- var content []byte // TODO
+ content, err := ioutil.ReadAll(in.Body)
+ errcheck(err)
edit := Edit{
UserName: userinfo.Name,
UserEmail: username+"@edit.team4272.com",