aboutsummaryrefslogtreecommitdiff
path: root/pkg/handler/git
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/handler/git')
-rw-r--r--pkg/handler/git/handler.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/handler/git/handler.go b/pkg/handler/git/handler.go
index f3e74c7..28cc99e 100644
--- a/pkg/handler/git/handler.go
+++ b/pkg/handler/git/handler.go
@@ -6,6 +6,7 @@ import (
"net/http"
"path/filepath"
+ "git.gabrielgio.me/cerrado/pkg/ext"
"git.gabrielgio.me/cerrado/pkg/service"
"git.gabrielgio.me/cerrado/templates"
"github.com/alecthomas/chroma/v2"
@@ -50,6 +51,7 @@ func (g *GitHandler) List(w http.ResponseWriter, _ *http.Request) {
}
func (g *GitHandler) Summary(w http.ResponseWriter, r *http.Request) {
+ ext.SetHTML(w)
name := r.PathValue("name")
ref, err := g.gitService.GetHead(name)
if err != nil {
@@ -66,6 +68,7 @@ func (g *GitHandler) Summary(w http.ResponseWriter, r *http.Request) {
}
func (g *GitHandler) About(w http.ResponseWriter, r *http.Request) {
+ ext.SetHTML(w)
name := r.PathValue("name")
ref, err := g.gitService.GetHead(name)
if err != nil {
@@ -81,6 +84,7 @@ func (g *GitHandler) About(w http.ResponseWriter, r *http.Request) {
}
func (g *GitHandler) Refs(w http.ResponseWriter, r *http.Request) {
+ ext.SetHTML(w)
name := r.PathValue("name")
tags, err := g.gitService.ListTags(name)
@@ -113,6 +117,7 @@ func (g *GitHandler) Refs(w http.ResponseWriter, r *http.Request) {
}
func (g *GitHandler) Tree(w http.ResponseWriter, r *http.Request) {
+ ext.SetHTML(w)
name := r.PathValue("name")
ref := r.PathValue("ref")
rest := r.PathValue("rest")
@@ -137,6 +142,7 @@ func (g *GitHandler) Tree(w http.ResponseWriter, r *http.Request) {
}
func (g *GitHandler) Blob(w http.ResponseWriter, r *http.Request) {
+ ext.SetHTML(w)
name := r.PathValue("name")
ref := r.PathValue("ref")
rest := r.PathValue("rest")
@@ -178,6 +184,7 @@ func (g *GitHandler) Blob(w http.ResponseWriter, r *http.Request) {
}
func (g *GitHandler) Log(w http.ResponseWriter, r *http.Request) {
+ ext.SetHTML(w)
name := r.PathValue("name")
ref := r.PathValue("ref")