1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

And others

This commit is contained in:
Sandro Santilli
2016-11-07 17:53:22 +01:00
parent b3828e38a5
commit aadd7dcdc3
12 changed files with 34 additions and 34 deletions

View File

@@ -27,7 +27,7 @@ func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) {
Website: form.Website,
Location: form.Location,
IsActive: true,
Type: models.USER_TYPE_ORGANIZATION,
Type: models.UserTypeOrganization,
}
if err := models.CreateOrganization(org, u); err != nil {
if models.IsErrUserAlreadyExist(err) ||

View File

@@ -16,7 +16,7 @@ import (
func Search(ctx *context.APIContext) {
opts := &models.SearchUserOptions{
Keyword: ctx.Query("q"),
Type: models.USER_TYPE_INDIVIDUAL,
Type: models.UserTypeIndividual,
PageSize: com.StrTo(ctx.Query("limit")).MustInt(),
}
if opts.PageSize == 0 {