func HandleGetUsers(
	user *graylog.User, lgc *logic.Logic,
	w http.ResponseWriter, r *http.Request, _ httprouter.Params,
) (interface{}, int, error) {
	// GET /users List all users
	users, sc, err := lgc.GetUsers()
	for i, u := range users {
		u.Password = ""
		users[i] = u
	}
	if err != nil {
		return nil, sc, err
	}
	// TODO authorization
	return &graylog.UsersBody{Users: users}, sc, nil
}
// HandleGetUsers is the handler of GET Users API.
HandleGetUsers is the handler of GET Users API.
// HandleGetUsers is the handler of GET Users API .
func HandleGetUsers(
	user *graylog.User, lgc *logic.Logic,
	w http.ResponseWriter, r *http.Request, _ httprouter.Params,
) (interface{}, int, error) {
	users, sc, err := lgc.GetUsers()
	for i, u := range users {
		u.Password = ""
		users[i] = u
	}
	if err != nil {
		return nil, sc, err
	}
	return &graylog.UsersBody{Users: users}, sc, nil
}
func HandleGetUsers ( user * graylog . User , lgc * logic . Logic , w http . ResponseWriter , r * http . Request , _ httprouter . Params , ) ( interface { } , int , error ) { users , sc , err := lgc . GetUsers ( ) for i , u := range users { u . Password = " " users [ i ] = u } if err != nil { return nil , sc , err } return & graylog . UsersBody { Users : users } , sc , nil }
HandleGetUsers is the handler of GET Users API.
HandleGetUsers is the handler of GET Users API .
// GET /users List all users // TODO authorization