mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 08:02:36 +09:00 
			
		
		
		
	Fix test
There was a panic when there's no logged in user
This commit is contained in:
		@@ -33,7 +33,7 @@ func Search(ctx *context.APIContext) {
 | 
				
			|||||||
		OwnerID:  ctx.QueryInt64("uid"),
 | 
							OwnerID:  ctx.QueryInt64("uid"),
 | 
				
			||||||
		PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
 | 
							PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if ctx.User.ID == opts.OwnerID {
 | 
						if ctx.User != nil && ctx.User.ID == opts.OwnerID {
 | 
				
			||||||
		opts.Searcher = ctx.User
 | 
							opts.Searcher = ctx.User
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user