mirror of
https://github.com/gogs/gogs.git
synced 2026-05-06 20:36:57 +02:00
all: unwrap database.UsersStore interface (#7708)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user