From 5a664c7aeeb719ec6f6b38f33a220bf25f98f512 Mon Sep 17 00:00:00 2001 From: Sorikairo Date: Thu, 13 Oct 2022 20:33:41 +0900 Subject: [PATCH] fix(lifecycle-hooks): only call hooks once --- src/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.ts b/src/app.ts index 847ab512..8fa8e48e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -43,13 +43,13 @@ export class DanetApplication { if (metadata.controllers) { this.danetRouter.registerControllers(metadata.controllers); } - await this.hookExecutor.executeHookForEveryInjectable( - hookName.APP_BOOTSTRAP, - ); } async init(Module: Constructor) { await this.bootstrap(Module); + await this.hookExecutor.executeHookForEveryInjectable( + hookName.APP_BOOTSTRAP, + ); } async close() {