feat: Add search bar on user profile page. (#787)
This commit is contained in:
@ -1579,10 +1579,14 @@ func GetRepositoryByID(id int64) (*Repository, error) {
|
||||
}
|
||||
|
||||
// GetUserRepositories returns a list of repositories of given user.
|
||||
func GetUserRepositories(userID int64, private bool, page, pageSize int) ([]*Repository, error) {
|
||||
func GetUserRepositories(userID int64, private bool, page, pageSize int, orderBy string) ([]*Repository, error) {
|
||||
if len(orderBy) == 0 {
|
||||
orderBy = "updated_unix DESC"
|
||||
}
|
||||
|
||||
sess := x.
|
||||
Where("owner_id = ?", userID).
|
||||
Desc("updated_unix")
|
||||
OrderBy(orderBy)
|
||||
if !private {
|
||||
sess.And("is_private=?", false)
|
||||
}
|
||||
|
Reference in New Issue
Block a user