1
0
Fork 0
empact/server/api.go

18 lines
270 B
Go
Raw Normal View History

2015-03-05 15:25:26 +00:00
package server
import (
"encoding/json"
"net/http"
"github.com/localhots/empact/db"
)
func orgsListHandler(w http.ResponseWriter, r *http.Request) {
jsonHandler(w, r)
login := currentUser(r)
orgs := db.UserOrgs(login)
b, _ := json.Marshal(orgs)
w.Write(b)
}