feat: working on detail views.

This commit is contained in:
2025-01-12 17:42:06 -05:00
parent 0e31d2c30c
commit 1ce369e156
27 changed files with 527 additions and 137 deletions

View File

@@ -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