feat: Implements common database interactions as dependencies.
This commit is contained in:
@@ -34,6 +34,10 @@ public func configure(_ app: Application) async throws {
|
||||
|
||||
try withDependencies {
|
||||
$0.employees = .live(database: app.db(.sqlite))
|
||||
$0.purchaseOrders = .live(database: app.db(.sqlite))
|
||||
$0.users = .live(database: app.db(.sqlite))
|
||||
$0.vendorBranches = .live(database: app.db(.sqlite))
|
||||
$0.vendors = .live(database: app.db(.sqlite))
|
||||
} operation: {
|
||||
// register routes
|
||||
try routes(app)
|
||||
|
||||
Reference in New Issue
Block a user