Big Backend Refatoring: Renamed Account -> Org

This commit is contained in:
Torkel Ödegaard
2015-02-23 20:07:49 +01:00
parent e9e2fa2927
commit 26e4809e2e
43 changed files with 774 additions and 773 deletions

View File

@ -46,8 +46,8 @@ func Register(r *macaron.Macaron) {
r.Group("/user", func() {
r.Get("/", GetUser)
r.Put("/", bind(m.UpdateUserCommand{}), UpdateUser)
r.Post("/using/:id", SetUsingAccount)
r.Get("/accounts", GetUserAccounts)
r.Post("/using/:id", UserSetUsingOrg)
r.Get("/orgs", GetUserOrgList)
r.Post("/stars/dashboard/:id", StarDashboard)
r.Delete("/stars/dashboard/:id", UnstarDashboard)
r.Put("/password", bind(m.ChangeUserPasswordCommand{}), ChangeUserPassword)
@ -56,9 +56,9 @@ func Register(r *macaron.Macaron) {
// account
r.Group("/org", func() {
r.Get("/", GetOrg)
r.Post("/", bind(m.CreateAccountCommand{}), CreateOrg)
r.Put("/", bind(m.UpdateAccountCommand{}), UpdateOrg)
r.Post("/users", bind(m.AddAccountUserCommand{}), AddOrgUser)
r.Post("/", bind(m.CreateOrgCommand{}), CreateOrg)
r.Put("/", bind(m.UpdateOrgCommand{}), UpdateOrg)
r.Post("/users", bind(m.AddOrgUserCommand{}), AddOrgUser)
r.Get("/users", GetOrgUsers)
r.Delete("/users/:id", RemoveOrgUser)
}, reqAccountAdmin)