Skip to content

Commit

Permalink
add logger for @ResponseView
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent178 committed Dec 14, 2016
1 parent d3671b6 commit b0fc1f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/controllers/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {BadRequest} from "ts-httpexceptions";
import {InjectorService, RequestService} from "../services";
import InjectParams from "../metadata/inject-params";
import {BAD_REQUEST_REQUIRED} from "../constants/errors-msgs";
import {$log} from "ts-log-debug";

export const METHODS = [
"all", "checkout", "connect",
Expand Down Expand Up @@ -248,6 +249,7 @@ export class Endpoint {
const viewPath = Metadata.get(ENDPOINT_VIEW, instance, this.methodClassName);

if (viewPath !== undefined) {
$log.info(`[TSED] @ResponseView render ${viewPath}`);
response.render(viewPath, data);
return data;
}
Expand Down

0 comments on commit b0fc1f3

Please sign in to comment.