Change list teams API to non-admin specific

This commit is contained in:
Unknwon 2016-03-21 12:53:04 -04:00
parent e6f927f61a
commit 90e93b1f3a
4 changed files with 38 additions and 22 deletions

View file

@ -33,7 +33,7 @@ func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) {
if models.IsErrUserAlreadyExist(err) ||
models.IsErrNameReserved(err) ||
models.IsErrNamePatternNotAllowed(err) {
ctx.Error(422, "CreateOrganization", err)
ctx.Error(422, "", err)
} else {
ctx.Error(500, "CreateOrganization", err)
}