all: unwrap database.UsersStore interface (#7708)

This commit is contained in:
Joe Chen
2024-03-27 23:18:59 -04:00
committed by GitHub
parent 202012887a
commit d9ecdcaef0
62 changed files with 1246 additions and 4223 deletions

View File

@@ -122,9 +122,7 @@ func NewConnection(w logger.Writer) (*gorm.DB, error) {
return nil, errors.Wrap(err, "load login source files")
}
// Initialize stores, sorted in alphabetical order.
Users = NewUsersStore(db)
// Initialize the database handle.
Handle = &DB{db: db}
return db, nil
}
@@ -189,3 +187,7 @@ func (db *DB) Repositories() *RepositoriesStore {
func (db *DB) TwoFactors() *TwoFactorsStore {
return newTwoFactorsStore(db.db)
}
func (db *DB) Users() *UsersStore {
return newUsersStore(db.db)
}