mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-16 11:16:20 +00:00
committed by
Rainer Killinger
parent
5ff16c1005
commit
006bbebe60
@@ -21,6 +21,7 @@ import {
|
||||
SCPluginRegisterResponse,
|
||||
SCPluginRegisterRoute,
|
||||
} from '@openstapps/core';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import {deepStrictEqual} from 'assert';
|
||||
import {isTestEnvironment, plugins} from '../common';
|
||||
import {createRoute} from './route';
|
||||
@@ -75,6 +76,7 @@ function addPlugin(plugin: SCPluginMetaData): SCPluginRegisterResponse {
|
||||
}
|
||||
// it's a new plugin so it can be added to the map of plugins
|
||||
plugins.set(plugin.route, plugin);
|
||||
Logger.log(`Registered plugin (name: ${plugin.name}, address: ${plugin.address}) on the route "${plugin.route}".`);
|
||||
|
||||
return {success: true};
|
||||
}
|
||||
@@ -92,6 +94,7 @@ function removePlugin(route: string): SCPluginRegisterResponse {
|
||||
}
|
||||
// remove the plugin information using its route as a key
|
||||
plugins.delete(route);
|
||||
Logger.log(`Removed plugin that used the route "${route}".`);
|
||||
|
||||
return {success: true};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user