diff options
Diffstat (limited to 'routers/api/v1/repo')
-rw-r--r-- | routers/api/v1/repo/issue.go | 3 | ||||
-rw-r--r-- | routers/api/v1/repo/repo.go | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index 69b8a36995..1219ef2e41 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -73,13 +73,12 @@ func SearchIssues(ctx *context.APIContext) { AllPublic: true, TopicOnly: false, Collaborate: util.OptionalBoolNone, - UserIsAdmin: ctx.IsUserSiteAdmin(), OrderBy: models.SearchOrderByRecentUpdated, + Actor: ctx.User, } if ctx.IsSigned { opts.Private = true opts.AllLimited = true - opts.UserID = ctx.User.ID } issueCount := 0 for page := 1; ; page++ { diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index c7959c6db9..9ae0c4af4e 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -126,6 +126,7 @@ func Search(ctx *context.APIContext) { // "$ref": "#/responses/validationError" opts := &models.SearchRepoOptions{ + Actor: ctx.User, Keyword: strings.Trim(ctx.Query("q"), " "), OwnerID: ctx.QueryInt64("uid"), PriorityOwnerID: ctx.QueryInt64("priority_owner_id"), @@ -135,8 +136,6 @@ func Search(ctx *context.APIContext) { Collaborate: util.OptionalBoolNone, Private: ctx.IsSigned && (ctx.Query("private") == "" || ctx.QueryBool("private")), Template: util.OptionalBoolNone, - UserIsAdmin: ctx.IsUserSiteAdmin(), - UserID: ctx.Data["SignedUserID"].(int64), StarredByID: ctx.QueryInt64("starredBy"), IncludeDescription: ctx.QueryBool("includeDesc"), } |