From 4af92c96bc39c1bdc1fc0facb280d56aefbc6f0d Mon Sep 17 00:00:00 2001 From: Kevin Sijbers Date: Sat, 6 Feb 2021 17:00:11 +0100 Subject: [PATCH] fix(Notores.ts): Formatting of path table was wrong --- src/Notores.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Notores.ts b/src/Notores.ts index fb066fc..c296970 100644 --- a/src/Notores.ts +++ b/src/Notores.ts @@ -47,7 +47,18 @@ export class NotoresApplication { bindModules() { this.controllers = bindControllers(this.apps, this.modules.map(m => typeof m === 'function' ? m : m.default)); - console.table(paths); + // @ts-ignore + const flatten = (input: any) => ([input].flatMap((e) => e)).join(', '); + const pathInfo = paths.map( + (r: any) => ({ + ...r, + ROUTE: flatten(r.ROUTE), + PATH: flatten(r.PATH), + PAGES: flatten(r.PAGES), + ROLES: flatten(r.ROLES), + }) + ); + console.table(pathInfo); } addConnectionToRequest() {