mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 00:20:50 +00:00
Move some repository methods from models to modules/repository (#9353)
* Move some repository methods from models to modules/repository * fix test
This commit is contained in:
parent
2904abdc22
commit
7b2ff82d20
10 changed files with 245 additions and 209 deletions
|
@ -97,3 +97,9 @@ func MirrorsIterate(f func(idx int, bean interface{}) error) error {
|
|||
And("next_update_unix!=0").
|
||||
Iterate(new(Mirror), f)
|
||||
}
|
||||
|
||||
// InsertMirror inserts a mirror to database
|
||||
func InsertMirror(mirror *Mirror) error {
|
||||
_, err := x.Insert(mirror)
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue