diff options
Diffstat (limited to 'http_handle_repo_raw.go')
-rw-r--r-- | http_handle_repo_raw.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go index c7f5653..286cbdf 100644 --- a/http_handle_repo_raw.go +++ b/http_handle_repo_raw.go @@ -27,14 +27,14 @@ func (s *Server) httpHandleRepoRaw(writer http.ResponseWriter, request *http.Req client, err := git2c.NewClient(s.config.Git.Socket) if err != nil { - web.ErrorPage500(templates, writer, params, err.Error()) + web.ErrorPage500(s.templates, writer, params, err.Error()) return } defer client.Close() files, content, err := client.Cmd2(repoPath, pathSpec) if err != nil { - web.ErrorPage500(templates, writer, params, err.Error()) + web.ErrorPage500(s.templates, writer, params, err.Error()) return } @@ -43,7 +43,7 @@ func (s *Server) httpHandleRepoRaw(writer http.ResponseWriter, request *http.Req params["files"] = files params["readme_filename"] = "README.md" params["readme"] = template.HTML("<p>README rendering here is WIP again</p>") // TODO - renderTemplate(writer, "repo_raw_dir", params) + s.renderTemplate(writer, "repo_raw_dir", params) case content != "": if misc.RedirectNoDir(writer, request) { return @@ -51,6 +51,6 @@ func (s *Server) httpHandleRepoRaw(writer http.ResponseWriter, request *http.Req writer.Header().Set("Content-Type", "application/octet-stream") fmt.Fprint(writer, content) default: - web.ErrorPage500(templates, writer, params, "Unknown error fetching repo raw data") + web.ErrorPage500(s.templates, writer, params, "Unknown error fetching repo raw data") } } |