Пример #1
0
func NewUser(w http.ResponseWriter, r *http.Request, params martini.Params) (int, string) {
	userName := params["userName"]
	userId := store.NewUser(userName)
	return 200, string(utils.MustMarshal(userId))
}
Пример #2
0
func GetUsers(w http.ResponseWriter, r *http.Request, params martini.Params) (int, string) {
	return 200, string(utils.MustMarshal(store.Users))
}