diff --git a/src/Application.ts b/src/Application.ts index a96b8ea..77669f3 100644 --- a/src/Application.ts +++ b/src/Application.ts @@ -107,7 +107,7 @@ export default abstract class Application implements Extendable { - req.flash('validation', err.getMessages().toString()); + req.flash('validation', err.getMessages()); res.redirectBack(); }, }); diff --git a/src/types/Express.d.ts b/src/types/Express.d.ts index a0be0f8..2c0013d 100644 --- a/src/types/Express.d.ts +++ b/src/types/Express.d.ts @@ -24,7 +24,7 @@ declare global { flash(message: string): unknown[]; - flash(event: string, message: string): void; + flash(event: string, message: unknown): void; } export interface Response {