all repos — elgit @ 8f562b78446b9fb5bfc73a6f41788647a3779189

fork of legit: web frontend for git, written in go

update repository list on timer instead of generating per request

Alan Pearce
commit

8f562b78446b9fb5bfc73a6f41788647a3779189

parent

975625f9d4d26eb56f4428f2921b9e1090a49621

1 file changed, 4 insertions(+), 2 deletions(-)

changed files
M routes/routes.goroutes/routes.go
@@ -10,6 +10,7 @@ "strconv"
"strings" "alin.ovh/elgit/config" + "alin.ovh/elgit/data" "alin.ovh/elgit/git" "alin.ovh/elgit/templates" "github.com/microcosm-cc/bluemonday"
@@ -21,10 +22,11 @@
type deps struct { c *config.Config projects []string + repos *data.Entries } func (d *deps) Index(rc *atreugo.RequestCtx) error { - repos := d.getAllRepos() + pageData := templates.PageData{ Meta: d.c.Meta,
@@ -32,7 +34,7 @@ }
rc.SetContentType("text/html; charset=utf-8") - return templates.IndexPage(pageData, repos).Render(rc) + return templates.IndexPage(pageData, d.repos).Render(rc) } func (d *deps) RepoIndex(rc *atreugo.RequestCtx) error {