mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 23:06:36 +08:00
oauth
This commit is contained in:
@@ -175,3 +175,8 @@ func buildDSN(host string, port int, username, password string) string {
|
||||
func DB(ctx context.Context) *gorm.DB {
|
||||
return db.WithContext(ctx)
|
||||
}
|
||||
|
||||
// SetDB sets the package-level database instance for testing.
|
||||
func SetDB(d *gorm.DB) {
|
||||
db = d
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user