Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private readonly dns: DNSHealthIndicator,
private readonly mongo: MongooseHealthIndicator,
) {
}
@Get('stats')
async fetchStats(): Promise {
return {
'user_count': await this.userService.count(),
'model_count': await this.modelService.count()
}
}
@Get('health')
@HealthCheck()
check() {
return this.health.check([
() => this.dns.pingCheck('aid-docs', 'https://aid.autoai.org')
//() => this.mongo.pingCheck('aid-database', { connection: config.MONGO_URI })
]);
}
}