Skip to content

Commit 4428511

Browse files
committed
chore: health-check response ObjectSanitizer -> ObjectValSan
1 parent 813e23f commit 4428511

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/router/endpoints/health-check-endpoint.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
Iso8601TimestampValSan,
33
MinLengthValidator,
4-
ObjectSanitizer,
4+
ObjectValSan,
55
StringToNumberValSan,
66
} from 'valsan';
77
import { GetEndpoint } from './get-endpoint';
@@ -16,11 +16,13 @@ export class HealthCheckEndpoint extends GetEndpoint {
1616
environment: 'development',
1717
};
1818

19-
override response = new ObjectSanitizer({
20-
status: new MinLengthValidator(),
21-
timestamp: new Iso8601TimestampValSan(),
22-
uptime: new StringToNumberValSan(),
23-
environment: new MinLengthValidator(),
19+
override response = new ObjectValSan({
20+
schema: {
21+
status: new MinLengthValidator(),
22+
timestamp: new Iso8601TimestampValSan(),
23+
uptime: new StringToNumberValSan(),
24+
environment: new MinLengthValidator(),
25+
},
2426
});
2527

2628
async handle() {

0 commit comments

Comments
 (0)