Esempio n. 1
0
// set up the admin Routes, and add in the Authenticator middleware if present
func Routes(r *gin.RouterGroup) {
	// root level is list of admin models
	r.Handle("GET", "/", index)
	r.Handle("GET", "/:model/", list)
	r.Handle("POST", "/:model/", listUpdate)
	r.Handle("GET", "/:model/:pk", change)
	r.Handle("POST", "/:model/:pk", changeUpdate)
}
Esempio n. 2
0
File: common.go Progetto: ovh/tat
func handle(g *gin.RouterGroup, m string, s string, h ...gin.HandlerFunc) {
	g.Handle(m, s, h...)
}