feat: Fixes 'any' not being used in some function calls.
This commit is contained in:
@@ -87,5 +87,8 @@ let package = Package(
|
|||||||
|
|
||||||
var swiftSettings: [SwiftSetting] { [
|
var swiftSettings: [SwiftSetting] { [
|
||||||
.enableUpcomingFeature("DisableOutwardActorInference"),
|
.enableUpcomingFeature("DisableOutwardActorInference"),
|
||||||
.enableExperimentalFeature("StrictConcurrency")
|
.enableExperimentalFeature("StrictConcurrency=complete"),
|
||||||
|
.enableUpcomingFeature("ExistentialAny"),
|
||||||
|
.enableUpcomingFeature("ConciseMagicFile"),
|
||||||
|
.enableUpcomingFeature("ForwardTrailinClosures")
|
||||||
] }
|
] }
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import Fluent
|
|||||||
import Vapor
|
import Vapor
|
||||||
|
|
||||||
struct ApiController: RouteCollection {
|
struct ApiController: RouteCollection {
|
||||||
func boot(routes: RoutesBuilder) throws {
|
func boot(routes: any RoutesBuilder) throws {
|
||||||
try routes.register(collection: EmployeeApiController())
|
try routes.register(collection: EmployeeApiController())
|
||||||
try routes.register(collection: PurchaseOrderApiController())
|
try routes.register(collection: PurchaseOrderApiController())
|
||||||
try routes.register(collection: UserApiController())
|
try routes.register(collection: UserApiController())
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ extension Employee {
|
|||||||
|
|
||||||
let name = "CreateEmployee"
|
let name = "CreateEmployee"
|
||||||
|
|
||||||
func prepare(on database: Database) async throws {
|
func prepare(on database: any Database) async throws {
|
||||||
try await database.schema(Employee.schema)
|
try await database.schema(Employee.schema)
|
||||||
.id()
|
.id()
|
||||||
.field("first_name", .string, .required)
|
.field("first_name", .string, .required)
|
||||||
@@ -135,7 +135,7 @@ extension Employee {
|
|||||||
.create()
|
.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
func revert(on database: Database) async throws {
|
func revert(on database: any Database) async throws {
|
||||||
try await database.schema(Employee.schema).delete()
|
try await database.schema(Employee.schema).delete()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ extension Vendor {
|
|||||||
struct Migrate: AsyncMigration {
|
struct Migrate: AsyncMigration {
|
||||||
let name = "CreateVendor"
|
let name = "CreateVendor"
|
||||||
|
|
||||||
func prepare(on database: Database) async throws {
|
func prepare(on database: any Database) async throws {
|
||||||
try await database.schema(Vendor.schema)
|
try await database.schema(Vendor.schema)
|
||||||
.id()
|
.id()
|
||||||
.field("name", .string, .required)
|
.field("name", .string, .required)
|
||||||
@@ -88,7 +88,7 @@ extension Vendor {
|
|||||||
.create()
|
.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
func revert(on database: Database) async throws {
|
func revert(on database: any Database) async throws {
|
||||||
try await database.schema(Vendor.schema).delete()
|
try await database.schema(Vendor.schema).delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ extension VendorBranch {
|
|||||||
struct Migrate: AsyncMigration {
|
struct Migrate: AsyncMigration {
|
||||||
let name = "CreateVendorBranch"
|
let name = "CreateVendorBranch"
|
||||||
|
|
||||||
func prepare(on database: Database) async throws {
|
func prepare(on database: any Database) async throws {
|
||||||
try await database.schema(VendorBranch.schema)
|
try await database.schema(VendorBranch.schema)
|
||||||
.id()
|
.id()
|
||||||
.field("name", .string, .required)
|
.field("name", .string, .required)
|
||||||
@@ -94,7 +94,7 @@ extension VendorBranch {
|
|||||||
.create()
|
.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
func revert(on database: Database) async throws {
|
func revert(on database: any Database) async throws {
|
||||||
try await database.schema(VendorBranch.schema).delete()
|
try await database.schema(VendorBranch.schema).delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ extension Employee {
|
|||||||
|
|
||||||
let name = "CreateEmployee"
|
let name = "CreateEmployee"
|
||||||
|
|
||||||
func prepare(on database: Database) async throws {
|
func prepare(on database: any Database) async throws {
|
||||||
try await database.schema(EmployeeModel.schema)
|
try await database.schema(EmployeeModel.schema)
|
||||||
.id()
|
.id()
|
||||||
.field("first_name", .string, .required)
|
.field("first_name", .string, .required)
|
||||||
@@ -94,7 +94,7 @@ extension Employee {
|
|||||||
.create()
|
.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
func revert(on database: Database) async throws {
|
func revert(on database: any Database) async throws {
|
||||||
try await database.schema(EmployeeModel.schema).delete()
|
try await database.schema(EmployeeModel.schema).delete()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ extension VendorBranch {
|
|||||||
struct Migrate: AsyncMigration {
|
struct Migrate: AsyncMigration {
|
||||||
let name = "CreateVendorBranch"
|
let name = "CreateVendorBranch"
|
||||||
|
|
||||||
func prepare(on database: Database) async throws {
|
func prepare(on database: any Database) async throws {
|
||||||
try await database.schema(VendorBranchModel.schema)
|
try await database.schema(VendorBranchModel.schema)
|
||||||
.id()
|
.id()
|
||||||
.field("name", .string, .required)
|
.field("name", .string, .required)
|
||||||
@@ -66,7 +66,7 @@ extension VendorBranch {
|
|||||||
.create()
|
.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
func revert(on database: Database) async throws {
|
func revert(on database: any Database) async throws {
|
||||||
try await database.schema(VendorBranchModel.schema).delete()
|
try await database.schema(VendorBranchModel.schema).delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ extension Vendor {
|
|||||||
struct Migrate: AsyncMigration {
|
struct Migrate: AsyncMigration {
|
||||||
let name = "CreateVendor"
|
let name = "CreateVendor"
|
||||||
|
|
||||||
func prepare(on database: Database) async throws {
|
func prepare(on database: any Database) async throws {
|
||||||
try await database.schema(VendorModel.schema)
|
try await database.schema(VendorModel.schema)
|
||||||
.id()
|
.id()
|
||||||
.field("name", .string, .required)
|
.field("name", .string, .required)
|
||||||
@@ -62,7 +62,7 @@ extension Vendor {
|
|||||||
.create()
|
.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
func revert(on database: Database) async throws {
|
func revert(on database: any Database) async throws {
|
||||||
try await database.schema(VendorModel.schema).delete()
|
try await database.schema(VendorModel.schema).delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user