mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Some repository refactors (#17950)
* some repository refactors * remove unnecessary code * Fix test * Remove unnecessary banner
This commit is contained in:
@@ -107,3 +107,10 @@ func FindRepoArchives(opts FindRepoArchiversOption) ([]*RepoArchiver, error) {
|
||||
Find(&archivers)
|
||||
return archivers, err
|
||||
}
|
||||
|
||||
// SetArchiveRepoState sets if a repo is archived
|
||||
func SetArchiveRepoState(repo *Repository, isArchived bool) (err error) {
|
||||
repo.IsArchived = isArchived
|
||||
_, err = db.GetEngine(db.DefaultContext).Where("id = ?", repo.ID).Cols("is_archived").NoAutoTime().Update(repo)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user