feat: Adds update route to equipment info, reorganizes views.

This commit is contained in:
2026-01-05 11:27:20 -05:00
parent 55a3adde25
commit fb7cf9905c
17 changed files with 357 additions and 121 deletions

View File

@@ -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)