feat: Cleans up routes.

This commit is contained in:
2025-01-19 13:33:01 -05:00
parent 1c8748211c
commit b23dc6bf07
32 changed files with 958 additions and 1786 deletions

View File

@@ -92,10 +92,8 @@ extension Vendor.Create {
extension Vendor.Update {
func validate() throws {
if let name {
guard !name.isEmpty else {
throw ValidationError(message: "Vendor name should not be empty.")
}
guard !name.isEmpty else {
throw ValidationError(message: "Vendor name should not be empty.")
}
}
}
@@ -141,8 +139,6 @@ final class VendorModel: Model, @unchecked Sendable {
func applyUpdates(_ updates: Vendor.Update) throws {
try updates.validate()
if let name = updates.name {
self.name = name
}
name = updates.name
}
}