We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 813e23f commit 4428511Copy full SHA for 4428511
1 file changed
src/router/endpoints/health-check-endpoint.ts
@@ -1,7 +1,7 @@
1
import {
2
Iso8601TimestampValSan,
3
MinLengthValidator,
4
- ObjectSanitizer,
+ ObjectValSan,
5
StringToNumberValSan,
6
} from 'valsan';
7
import { GetEndpoint } from './get-endpoint';
@@ -16,11 +16,13 @@ export class HealthCheckEndpoint extends GetEndpoint {
16
environment: 'development',
17
};
18
19
- override response = new ObjectSanitizer({
20
- status: new MinLengthValidator(),
21
- timestamp: new Iso8601TimestampValSan(),
22
- uptime: new StringToNumberValSan(),
23
- environment: new MinLengthValidator(),
+ override response = new ObjectValSan({
+ schema: {
+ status: new MinLengthValidator(),
+ timestamp: new Iso8601TimestampValSan(),
+ uptime: new StringToNumberValSan(),
24
+ environment: new MinLengthValidator(),
25
+ },
26
});
27
28
async handle() {
0 commit comments