Unify project indentation style
This commit is contained in:
parent
36afeaad42
commit
bf2c4ec99a
8 changed files with 214 additions and 214 deletions
|
|
@ -8,34 +8,34 @@ import slick.jdbc.JdbcProfile
|
|||
import scala.concurrent.ExecutionContext
|
||||
|
||||
class DatabaseLayer(
|
||||
val uac: UACModule,
|
||||
val exec: ExecutorModule
|
||||
val uac: UACModule,
|
||||
val exec: ExecutorModule
|
||||
)
|
||||
|
||||
|
||||
object DatabaseLayer:
|
||||
def setup(
|
||||
profile: JdbcProfile,
|
||||
config_loc: String = "db_conf"
|
||||
)(implicit ec: ExecutionContext): Future[DatabaseLayer] =
|
||||
import profile.api._
|
||||
val database = Database.forConfig(config_loc)
|
||||
def setup(
|
||||
profile: JdbcProfile,
|
||||
config_loc: String = "db_conf"
|
||||
)(implicit ec: ExecutionContext): Future[DatabaseLayer] =
|
||||
import profile.api._
|
||||
val database = Database.forConfig(config_loc)
|
||||
|
||||
// Construct and initialize modules
|
||||
val uacModule = UACModule(profile, database)
|
||||
val uacSetupActions = uacModule.setup
|
||||
// Construct and initialize modules
|
||||
val uacModule = UACModule(profile, database)
|
||||
val uacSetupActions = uacModule.setup
|
||||
|
||||
val executorModule = ExecutorModule(profile, database)
|
||||
val executorSetupOptions = executorModule.setup
|
||||
val executorModule = ExecutorModule(profile, database)
|
||||
val executorSetupOptions = executorModule.setup
|
||||
|
||||
// Run initialization actions
|
||||
val initActions = DBIO.seq(
|
||||
uacSetupActions,
|
||||
executorSetupOptions
|
||||
)
|
||||
// Run initialization actions
|
||||
val initActions = DBIO.seq(
|
||||
uacSetupActions,
|
||||
executorSetupOptions
|
||||
)
|
||||
|
||||
database.run(initActions).map(_ =>
|
||||
DatabaseLayer(uacModule, executorModule)
|
||||
)
|
||||
database.run(initActions).map(_ =>
|
||||
DatabaseLayer(uacModule, executorModule)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue