Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expand register add loadUnit #251

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/controller/lib/AppLoadUnitControllerHook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class AppLoadUnitControllerHook implements LifecycleHook<LoadUnitLifecycl
throw new Error(`not find controller implement for ${String(proto.name)} which type is ${metadata.type}`);
}
ControllerMetadataManager.instance.addController(metadata);
await register.register(this.rootProtoManager);
await register.register(this.rootProtoManager, obj);
}
}
}
3 changes: 2 additions & 1 deletion plugin/controller/lib/ControllerRegister.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { LoadUnit } from '@eggjs/tegg-metadata';
import { RootProtoManager } from './RootProtoManager';

export interface ControllerRegister {
register(rootProtoManager: RootProtoManager): Promise<void>;
register(rootProtoManager: RootProtoManager, loadUnit?: LoadUnit): Promise<void>;
killagu marked this conversation as resolved.
Show resolved Hide resolved
}
Loading