示例#1
0
func getProjects(params martini.Params, r render.Render, m model.Model) {
	if name := params["name"]; name != "" {
		r.JSON(200, m.User(name).Projects)
	} else {
		r.JSON(200, m.User("zephyyrr").Projects)

	}

}
示例#2
0
func getUser(params martini.Params, r render.Render, m model.Model) {
	r.JSON(200, m.User(params["name"]))
}
示例#3
0
func getUsers(r render.Render, m model.Model) {
	r.JSON(200, m.Users())
}