feat: Adds update route to equipment info, reorganizes views.
This commit is contained in:
@@ -3,6 +3,7 @@ import Fluent
|
||||
import ManualDCore
|
||||
import Vapor
|
||||
|
||||
// FIX: Remove these, not used currently.
|
||||
extension DatabaseClient.Projects {
|
||||
|
||||
func fetchPage(
|
||||
@@ -21,6 +22,16 @@ extension DatabaseClient.Projects {
|
||||
}
|
||||
}
|
||||
|
||||
extension DatabaseClient.ComponentLoss {
|
||||
|
||||
func createDefaults(projectID: Project.ID) async throws {
|
||||
let defaults = ComponentPressureLoss.Create.default(projectID: projectID)
|
||||
for loss in defaults {
|
||||
_ = try await create(loss)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension PageRequest {
|
||||
static func next<T>(_ currentPage: Page<T>) -> Self {
|
||||
.init(page: currentPage.metadata.page + 1, per: currentPage.metadata.per)
|
||||
|
||||
Reference in New Issue
Block a user