forked from forgejo/forgejo
Various fixes in login sources (#10428)
This commit is contained in:
parent
542bd59239
commit
09dbd85a3a
15 changed files with 66 additions and 21 deletions
|
@ -67,6 +67,7 @@ func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) {
|
|||
if err := models.CreateOrganization(org, u); err != nil {
|
||||
if models.IsErrUserAlreadyExist(err) ||
|
||||
models.IsErrNameReserved(err) ||
|
||||
models.IsErrNameCharsNotAllowed(err) ||
|
||||
models.IsErrNamePatternNotAllowed(err) {
|
||||
ctx.Error(http.StatusUnprocessableEntity, "", err)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue