Fix validation errors not being flashed correctly
This commit is contained in:
parent
6fa2683318
commit
7c2572cddc
@ -107,7 +107,7 @@ export default abstract class Application implements Extendable<ApplicationCompo
|
||||
res.send('Error: ' + err.getMessages());
|
||||
},
|
||||
html: () => {
|
||||
req.flash('validation', err.getMessages().toString());
|
||||
req.flash('validation', err.getMessages());
|
||||
res.redirectBack();
|
||||
},
|
||||
});
|
||||
|
2
src/types/Express.d.ts
vendored
2
src/types/Express.d.ts
vendored
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user