mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
move repository deletion to service layer (#26948)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
||||
func TeamAddRepository(t *organization.Team, repo *repo_model.Repository) (err error) {
|
||||
if repo.OwnerID != t.OrgID {
|
||||
return errors.New("repository does not belong to organization")
|
||||
} else if models.HasRepository(t, repo.ID) {
|
||||
} else if organization.HasTeamRepo(db.DefaultContext, t.OrgID, t.ID, repo.ID) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user