feat: Moves database dependency directory.
This commit is contained in:
@@ -39,9 +39,10 @@ struct VendorBranchApiController: RouteCollection {
|
||||
guard let id = req.parameters.get("vendorID", as: Vendor.IDValue.self) else {
|
||||
throw Abort(.badRequest, reason: "Vendor id not provided.")
|
||||
}
|
||||
try VendorBranch.Create.validate(content: req)
|
||||
let model = try req.content.decode(VendorBranch.Create.self)
|
||||
return try await vendorBranches.create(model, id)
|
||||
return try await vendorBranches.create(
|
||||
req.ensureValidContent(VendorBranch.Create.self),
|
||||
id
|
||||
)
|
||||
}
|
||||
|
||||
@Sendable
|
||||
|
||||
Reference in New Issue
Block a user