feat: Initial purchase order views, login seems to be broken though.

This commit is contained in:
2025-01-17 12:58:32 -05:00
parent e1d07008a1
commit be0b5a6033
18 changed files with 534 additions and 288 deletions

View File

@@ -28,8 +28,8 @@ struct PurchaseOrderApiController: RouteCollection {
@Sendable
func create(req: Request) async throws -> PurchaseOrder {
try await purchaseOrders.create(
req.content.decode(PurchaseOrder.Create.self),
req.auth.require(User.self).id
req.content.decode(PurchaseOrder.CreateIntermediate.self)
.toCreate(createdByID: req.auth.require(User.self).id)
)
}