And others
This commit is contained in:
parent
b3828e38a5
commit
aadd7dcdc3
12 changed files with 34 additions and 34 deletions
|
@ -22,7 +22,7 @@ func Organizations(ctx *context.Context) {
|
|||
ctx.Data["PageIsAdminOrganizations"] = true
|
||||
|
||||
routers.RenderUserSearch(ctx, &routers.UserSearchOptions{
|
||||
Type: models.USER_TYPE_ORGANIZATION,
|
||||
Type: models.UserTypeOrganization,
|
||||
Counter: models.CountOrganizations,
|
||||
Ranger: models.Organizations,
|
||||
PageSize: setting.UI.Admin.OrgPagingNum,
|
||||
|
|
|
@ -30,7 +30,7 @@ func Users(ctx *context.Context) {
|
|||
ctx.Data["PageIsAdminUsers"] = true
|
||||
|
||||
routers.RenderUserSearch(ctx, &routers.UserSearchOptions{
|
||||
Type: models.USER_TYPE_INDIVIDUAL,
|
||||
Type: models.UserTypeIndividual,
|
||||
Counter: models.CountUsers,
|
||||
Ranger: models.Users,
|
||||
PageSize: setting.UI.Admin.UserPagingNum,
|
||||
|
|
|
@ -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) ||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -172,7 +172,7 @@ func ExploreUsers(ctx *context.Context) {
|
|||
ctx.Data["PageIsExploreUsers"] = true
|
||||
|
||||
RenderUserSearch(ctx, &UserSearchOptions{
|
||||
Type: models.USER_TYPE_INDIVIDUAL,
|
||||
Type: models.UserTypeIndividual,
|
||||
Counter: models.CountUsers,
|
||||
Ranger: models.Users,
|
||||
PageSize: setting.UI.ExplorePagingNum,
|
||||
|
@ -187,7 +187,7 @@ func ExploreOrganizations(ctx *context.Context) {
|
|||
ctx.Data["PageIsExploreOrganizations"] = true
|
||||
|
||||
RenderUserSearch(ctx, &UserSearchOptions{
|
||||
Type: models.USER_TYPE_ORGANIZATION,
|
||||
Type: models.UserTypeOrganization,
|
||||
Counter: models.CountOrganizations,
|
||||
Ranger: models.Organizations,
|
||||
PageSize: setting.UI.ExplorePagingNum,
|
||||
|
|
|
@ -33,7 +33,7 @@ func CreatePost(ctx *context.Context, form auth.CreateOrgForm) {
|
|||
org := &models.User{
|
||||
Name: form.OrgName,
|
||||
IsActive: true,
|
||||
Type: models.USER_TYPE_ORGANIZATION,
|
||||
Type: models.UserTypeOrganization,
|
||||
}
|
||||
|
||||
if err := models.CreateOrganization(org, ctx.User); err != nil {
|
||||
|
|
|
@ -134,9 +134,9 @@ func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) {
|
|||
return
|
||||
}
|
||||
|
||||
contentType := models.JSON
|
||||
if models.HookContentType(form.ContentType) == models.FORM {
|
||||
contentType = models.FORM
|
||||
contentType := models.ContentTypeJson
|
||||
if models.HookContentType(form.ContentType) == models.ContentTypeForm {
|
||||
contentType = models.ContentTypeForm
|
||||
}
|
||||
|
||||
w := &models.Webhook{
|
||||
|
@ -192,7 +192,7 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) {
|
|||
w := &models.Webhook{
|
||||
RepoID: orCtx.RepoID,
|
||||
URL: form.PayloadURL,
|
||||
ContentType: models.JSON,
|
||||
ContentType: models.ContentTypeJson,
|
||||
HookEvent: ParseHookEvent(form.WebhookForm),
|
||||
IsActive: form.Active,
|
||||
HookTaskType: models.SLACK,
|
||||
|
@ -281,9 +281,9 @@ func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) {
|
|||
return
|
||||
}
|
||||
|
||||
contentType := models.JSON
|
||||
if models.HookContentType(form.ContentType) == models.FORM {
|
||||
contentType = models.FORM
|
||||
contentType := models.ContentTypeJson
|
||||
if models.HookContentType(form.ContentType) == models.ContentTypeForm {
|
||||
contentType = models.ContentTypeForm
|
||||
}
|
||||
|
||||
w.URL = form.PayloadURL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue