mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
Update api/src/plugins/plugins.service.ts
This commit is contained in:
parent
1c613790ea
commit
7e116fabd5
@ -47,7 +47,7 @@ export class PluginService<T extends BasePlugin = BasePlugin> {
|
|||||||
const registry = this.registry.get(type) as Map<PluginName, T>;
|
const registry = this.registry.get(type) as Map<PluginName, T>;
|
||||||
if (registry.has(name)) {
|
if (registry.has(name)) {
|
||||||
throw new InternalServerErrorException(
|
throw new InternalServerErrorException(
|
||||||
`setPlugin: Unable to setPlugin with name ${name} of type ${type} (duplicate names)`,
|
`Unable to setPlugin() with name ${name} of type ${type} (possible duplicate)`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
registry.set(name, plugin);
|
registry.set(name, plugin);
|
||||||
|
Loading…
Reference in New Issue
Block a user