{"size": 504, "ext": "js", "max_stars_repo_path": "client/static/identity/scripts/users.controller.js", "max_stars_repo_name": "vernikov/distribution", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/static/identity/scripts/users.controller.js", "max_issues_repo_name": "vernikov/distribution", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/static/identity/scripts/users.controller.js", "max_forks_repo_name": "vernikov/distribution", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.3846153846, "max_line_length": 75, "alphanum_fraction": 0.6666666667}
app.controller('Users', function (userAPI, $upload, $mdToast, $mdSidenav) {
	var viewModel = this

	var success = function (promise) {
		if (promise.users) {
			viewModel.users = promise.users
			console.log(viewModel.users)
		} else {
			$mdToast.showSimple(promise.error)
		}
	}

	var error = function (error) {
		$mdToast.showSimple('Something went wrong')
	}


	viewModel.list = function () {
		userAPI.list()
			.then(success, error)
	}

	// $mdSidenav('sidenav-left').toggle()
	viewModel.list()
})
