aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/repo.go')
-rw-r--r--routers/api/v1/repo/repo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index da4034a0d4..e0b693a4e5 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -33,6 +33,9 @@ func Search(ctx *context.APIContext) {
OwnerID: ctx.QueryInt64("uid"),
PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
}
+ if ctx.User != nil && ctx.User.ID == opts.OwnerID {
+ opts.Searcher = ctx.User
+ }
// Check visibility.
if ctx.IsSigned && opts.OwnerID > 0 {