summaryrefslogtreecommitdiff
path: root/src/edit/dir.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit/dir.go')
-rw-r--r--src/edit/dir.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/edit/dir.go b/src/edit/dir.go
index 8315dc0..304732e 100644
--- a/src/edit/dir.go
+++ b/src/edit/dir.go
@@ -18,8 +18,8 @@ func ServeGit(out http.ResponseWriter, in *http.Request) {
}
upath = path.Clean(upath)
- errcheck(GitPull())
- tree, err := GitLsTree()
+ errcheck(WWW.Pull())
+ tree, err := WWW.LsTree()
errcheck(err)
file, fileExists := tree[upath]
if file.Type == "tree" && in.Method != http.MethodPut {
@@ -60,7 +60,7 @@ func ServeGit(out http.ResponseWriter, in *http.Request) {
}
content, err := ioutil.ReadAll(in.Body)
errcheck(err)
- edit := Edit{
+ edit := GitCommit{
UserName: userinfo.Name,
UserEmail: username + "@edit.team4272.com",
Time: time.Now(),
@@ -69,8 +69,8 @@ func ServeGit(out http.ResponseWriter, in *http.Request) {
upath[1:]: content,
},
}
- errcheck(GitCommit(edit))
- errcheck(GitPush())
+ errcheck(WWW.Commit(edit))
+ errcheck(WWW.Push())
errcheck(renderModified(out, upath))
if fileExists {
out.WriteHeader(http.StatusOK)
@@ -89,7 +89,7 @@ func ServeGit(out http.ResponseWriter, in *http.Request) {
if msg == "" {
msg = fmt.Sprintf("web edit: delete %q", upath)
}
- edit := Edit{
+ edit := GitCommit{
UserName: userinfo.Name,
UserEmail: username + "@edit.team4272.com",
Time: time.Now(),
@@ -98,8 +98,8 @@ func ServeGit(out http.ResponseWriter, in *http.Request) {
upath[1:]: nil,
},
}
- errcheck(GitCommit(edit))
- errcheck(GitPush())
+ errcheck(WWW.Commit(edit))
+ errcheck(WWW.Push())
errcheck(renderDeleted(out, upath))
out.WriteHeader(http.StatusOK)
case http.MethodOptions: