mirror of
https://github.com/gogs/gogs.git
synced 2026-03-06 12:11:00 +01:00
all: unwrap database.OrganizationsStore interface (#7696)
This commit is contained in:
@@ -123,7 +123,6 @@ func NewConnection(w logger.Writer) (*gorm.DB, error) {
|
||||
}
|
||||
|
||||
// Initialize stores, sorted in alphabetical order.
|
||||
Orgs = NewOrgsStore(db)
|
||||
Perms = NewPermsStore(db)
|
||||
Repos = NewReposStore(db)
|
||||
TwoFactors = &twoFactorsStore{DB: db}
|
||||
@@ -132,6 +131,7 @@ func NewConnection(w logger.Writer) (*gorm.DB, error) {
|
||||
return db, nil
|
||||
}
|
||||
|
||||
// DB is the database handler for the storage layer.
|
||||
type DB struct {
|
||||
db *gorm.DB
|
||||
}
|
||||
@@ -176,3 +176,7 @@ func (db *DB) LoginSources() *LoginSourcesStore {
|
||||
func (db *DB) Notices() *NoticesStore {
|
||||
return newNoticesStore(db.db)
|
||||
}
|
||||
|
||||
func (db *DB) Organizations() *OrganizationsStore {
|
||||
return newOrganizationsStoreStore(db.db)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user