summaryrefslogtreecommitdiffstats
path: root/routes/handler.go
blob: 13e4ae459b6cbc885272945ff0deeb7aa3193ed7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package routes

import (
	"github.com/alexedwards/flow"
	"icyphox.sh/legit/config"
)

func Handlers(c *config.Config) *flow.Mux {
	mux := flow.New()
	d := deps{c}
	mux.HandleFunc("/:name", d.Repo, "GET")
	mux.HandleFunc("/:name/tree/...", d.Repo, "GET")
	return mux
}