chore: Remove GetTeamNamesByID

- Introduced in 9ff4e1d2d9 and removed in
b3a6596b54.
This commit is contained in:
Gusted 2025-01-31 14:14:36 +01:00
parent e2dfdcdabd
commit 66d252bc2b
No known key found for this signature in database
GPG key ID: FD821B732837125F
2 changed files with 0 additions and 17 deletions

View file

@ -42,7 +42,6 @@ code.gitea.io/gitea/models/issues
IsErrIssueWasClosed
code.gitea.io/gitea/models/organization
GetTeamNamesByID
UpdateTeamUnits
SearchMembersOptions.ToConds

View file

@ -247,22 +247,6 @@ func GetTeamByID(ctx context.Context, teamID int64) (*Team, error) {
return t, nil
}
// GetTeamNamesByID returns team's lower name from a list of team ids.
func GetTeamNamesByID(ctx context.Context, teamIDs []int64) ([]string, error) {
if len(teamIDs) == 0 {
return []string{}, nil
}
var teamNames []string
err := db.GetEngine(ctx).Table("team").
Select("lower_name").
In("id", teamIDs).
Asc("name").
Find(&teamNames)
return teamNames, err
}
// IncrTeamRepoNum increases the number of repos for the given team by 1
func IncrTeamRepoNum(ctx context.Context, teamID int64) error {
_, err := db.GetEngine(ctx).Incr("num_repos").ID(teamID).Update(new(Team))