mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 13:11:02 +00:00
refactor(api): replace deprecated DNSHealthCheck
This commit is contained in:
parent
73bba4ef68
commit
3695fb7182
1 changed files with 4 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Controller, Get } from "@nestjs/common";
|
||||
import { ConfigService } from "@nestjs/config";
|
||||
import {
|
||||
DNSHealthIndicator,
|
||||
HttpHealthIndicator,
|
||||
HealthCheck,
|
||||
HealthCheckResult,
|
||||
HealthCheckService,
|
||||
|
|
@ -12,7 +12,7 @@ import {
|
|||
export class HealthCheckController {
|
||||
constructor(
|
||||
private readonly health: HealthCheckService,
|
||||
private readonly dns: DNSHealthIndicator,
|
||||
private readonly http: HttpHealthIndicator,
|
||||
private readonly typeorm: TypeOrmHealthIndicator,
|
||||
private readonly config: ConfigService
|
||||
) {}
|
||||
|
|
@ -22,12 +22,12 @@ export class HealthCheckController {
|
|||
check(): Promise<HealthCheckResult> {
|
||||
return this.health.check([
|
||||
() =>
|
||||
this.dns.pingCheck(
|
||||
this.http.pingCheck(
|
||||
"spotify-web",
|
||||
this.config.get<string>("SPOTIFY_WEB_API_URL")
|
||||
),
|
||||
() =>
|
||||
this.dns.pingCheck(
|
||||
this.http.pingCheck(
|
||||
"spotify-auth",
|
||||
this.config.get<string>("SPOTIFY_AUTH_API_URL")
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue