Skip to content

Commit e6dcda9

Browse files
committed
feat: override router child registration
1 parent 9e6f4ad commit e6dcda9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/router/router.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export abstract class BaseApiRouter extends BaseApiRoute {
5050
(instance as BaseApiEndpoint).tag = tag;
5151
}
5252

53-
await instance.register(this.router, this.fullPath);
53+
await this.registerInstance(instance);
5454

5555
this.registeredRoutes.push(instance);
5656

@@ -83,6 +83,10 @@ export abstract class BaseApiRouter extends BaseApiRoute {
8383
});
8484
});
8585
}
86+
87+
protected async registerInstance(instance: BaseApiRoute): Promise<void> {
88+
await instance.register(this.router, this.fullPath);
89+
}
8690
}
8791

8892
export type ApiRouter = { new (): BaseApiRouter };

0 commit comments

Comments
 (0)