feat: working on detail views.
This commit is contained in:
@@ -20,7 +20,7 @@ struct EmployeeApiController: RouteCollection {
|
||||
@Sendable
|
||||
func index(req: Request) async throws -> [Employee.DTO] {
|
||||
let params = try req.query.decode(EmployeesIndexQuery.self)
|
||||
return try await employees.fetchAll(params.active ?? false)
|
||||
return try await employees.fetchAll(params.active == true ? .active : .default)
|
||||
}
|
||||
|
||||
@Sendable
|
||||
|
||||
Reference in New Issue
Block a user