From 35cc963ca81f568402ccd7f2ee001222be1ae699 Mon Sep 17 00:00:00 2001 From: liuyi Date: Sat, 14 Jun 2025 20:58:41 +0800 Subject: [PATCH] add route module --- src/modules/restful/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/restful/utils.ts b/src/modules/restful/utils.ts index 70f37a8..70c6cc0 100644 --- a/src/modules/restful/utils.ts +++ b/src/modules/restful/utils.ts @@ -103,11 +103,11 @@ export async function echoApi(configure: Configure, container: NestFastifyApplic await echoApiDocs('default', defaultDoc, appUrl); for (const [name, doc] of Object.entries(docs)) { console.log(); - echoApiDocs(name, doc, appUrl); + await echoApiDocs(name, doc, appUrl); } } -export const listened: (app: App, startyTime: Date) => () => Promise = +export const listened: (app: App, startTime: Date) => () => Promise = ({ configure, container }, startTime) => async () => { console.log(); @@ -130,7 +130,7 @@ async function echoApiDocs(name: string, doc: ApiDocOption, appUrl: string) { console.log(`default:${chalk.green.underline(getDocPath(doc.default.path))}`); } if (doc.routes) { - Object.entries(doc.routes).forEach(([routeName, docs]) => { + Object.entries(doc.routes).forEach(([, docs]) => { console.log( `<${chalk.yellowBright.bold(docs.title)}>: ${chalk.green.underline( getDocPath(docs.path),