1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-12-05 23:18:43 +02:00

updating packages and refactoring code

This commit is contained in:
Braun Patrik
2016-12-26 23:36:38 +01:00
parent 3cd9ef7b1a
commit eaf678bedd
72 changed files with 868 additions and 955 deletions

View File

@@ -1,10 +1,10 @@
///<reference path="../../typings/index.d.ts"/>
import {RenderingMWs} from "../middlewares/RenderingMWs";
import {Error, ErrorCodes} from "../../common/entities/Error";
import Request = Express.Request;
import Response = Express.Response;
export class ErrorRouter {
constructor(private app) {
constructor(private app: any) {
this.addApiErrorHandler();
this.addGenericHandler();
@@ -17,7 +17,7 @@ export class ErrorRouter {
};
private addGenericHandler() {
this.app.use((err, req, res, next) => {
this.app.use((err: any, req: Request, res: Response, next: Function) => {
//Flush out the stack to the console
console.error(err.stack);