mirror of
https://github.com/apricote/Listory.git
synced 2026-02-07 10:17: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 { Controller, Get } from "@nestjs/common";
|
||||||
import { ConfigService } from "@nestjs/config";
|
import { ConfigService } from "@nestjs/config";
|
||||||
import {
|
import {
|
||||||
DNSHealthIndicator,
|
HttpHealthIndicator,
|
||||||
HealthCheck,
|
HealthCheck,
|
||||||
HealthCheckResult,
|
HealthCheckResult,
|
||||||
HealthCheckService,
|
HealthCheckService,
|
||||||
|
|
@ -12,7 +12,7 @@ import {
|
||||||
export class HealthCheckController {
|
export class HealthCheckController {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly health: HealthCheckService,
|
private readonly health: HealthCheckService,
|
||||||
private readonly dns: DNSHealthIndicator,
|
private readonly http: HttpHealthIndicator,
|
||||||
private readonly typeorm: TypeOrmHealthIndicator,
|
private readonly typeorm: TypeOrmHealthIndicator,
|
||||||
private readonly config: ConfigService
|
private readonly config: ConfigService
|
||||||
) {}
|
) {}
|
||||||
|
|
@ -22,12 +22,12 @@ export class HealthCheckController {
|
||||||
check(): Promise<HealthCheckResult> {
|
check(): Promise<HealthCheckResult> {
|
||||||
return this.health.check([
|
return this.health.check([
|
||||||
() =>
|
() =>
|
||||||
this.dns.pingCheck(
|
this.http.pingCheck(
|
||||||
"spotify-web",
|
"spotify-web",
|
||||||
this.config.get<string>("SPOTIFY_WEB_API_URL")
|
this.config.get<string>("SPOTIFY_WEB_API_URL")
|
||||||
),
|
),
|
||||||
() =>
|
() =>
|
||||||
this.dns.pingCheck(
|
this.http.pingCheck(
|
||||||
"spotify-auth",
|
"spotify-auth",
|
||||||
this.config.get<string>("SPOTIFY_AUTH_API_URL")
|
this.config.get<string>("SPOTIFY_AUTH_API_URL")
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue