Skip to content

Commit

Permalink
fix: remove content-type and set status instead
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienterrier committed Jul 11, 2019
1 parent eaa4d7d commit 71b05bb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/controllers/application.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Controller, Get, Res, Header } from '@nestjs/common';
import { Controller, Get, Res, Header, HttpStatus } from '@nestjs/common';
import { PrometheusService } from '../logger/prometheus.service';
import { logger } from '../logger/logger.service';
import { join } from 'path';
Expand All @@ -9,9 +9,8 @@ export class ApplicationController {
constructor(private readonly prometheus: PrometheusService) {}

@Get('/')
@Header('Content-Type', 'text/html')
async welcome(@Res() response): Promise<string> {
return response.send(Utils.renderHbs('homepage'));
return response.status(HttpStatus.OK).send(Utils.renderHbs('homepage'));
}

@Get('/metrics')
Expand Down

0 comments on commit 71b05bb

Please sign in to comment.