aboutsummaryrefslogtreecommitdiff
path: root/src/app.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.ts')
-rw-r--r--src/app.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app.ts b/src/app.ts
index 86b0c1c..28b97a7 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -18,6 +18,15 @@ class App {
this.precondition();
this.middleware();
this.mountRoutes();
+ this.express.use(
+ async(req: ex.Request, res: ex.Response, next: ex.NextFunction):
+ Promise<void> => {
+ res.json({
+ status: 'success',
+ data: await res.locals.data
+ });
+ }
+ );
this.errorware();
}