mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-28 21:00:03 +02:00
Global code search support (#3664)
* add global code search on explore * fix bug when no anyone public repos * change the icon * fix typo and add UnitTypeCode check for login non-admin user * fix ui description when no match
This commit is contained in:
parent
4163cdf3ea
commit
9e5d0a09eb
10 changed files with 238 additions and 9 deletions
|
@ -1945,6 +1945,12 @@ func GetRepositoryByID(id int64) (*Repository, error) {
|
|||
return getRepositoryByID(x, id)
|
||||
}
|
||||
|
||||
// GetRepositoriesMapByIDs returns the repositories by given id slice.
|
||||
func GetRepositoriesMapByIDs(ids []int64) (map[int64]*Repository, error) {
|
||||
var repos = make(map[int64]*Repository, len(ids))
|
||||
return repos, x.In("id", ids).Find(&repos)
|
||||
}
|
||||
|
||||
// GetUserRepositories returns a list of repositories of given user.
|
||||
func GetUserRepositories(userID int64, private bool, page, pageSize int, orderBy string) ([]*Repository, error) {
|
||||
if len(orderBy) == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue