Show user info

This commit is contained in:
2015-03-15 00:34:37 +07:00
parent 954e140dfd
commit ed49a23b94
4 changed files with 43 additions and 4 deletions
+6
View File
@@ -18,6 +18,12 @@ func apiTeamsHandler(w http.ResponseWriter, r *http.Request) {
req.respondWith(teams)
}
func apiUsersHandler(w http.ResponseWriter, r *http.Request) {
req, stat := parseRequest(w, r)
users := db.OrgUsers(stat.Org)
req.respondWith(users)
}
func apiReposHandler(w http.ResponseWriter, r *http.Request) {
req, stat := parseRequest(w, r)
repos := db.OrgRepos(stat.Org)
+1
View File
@@ -22,6 +22,7 @@ func init() {
http.HandleFunc("/api/", authHandler)
http.HandleFunc("/api/orgs", apiOrgsHandler)
http.HandleFunc("/api/teams", apiTeamsHandler)
http.HandleFunc("/api/users", apiUsersHandler)
http.HandleFunc("/api/repos", apiReposHandler)
http.HandleFunc("/api/stat/orgs/top", statOrgTopHandler)