mirror of
https://github.com/HeyPuter/puter
synced 2024-11-13 21:52:23 +00:00
move: BroadcastService to [+] BroadcastModule
This commit is contained in:
parent
cea29645fe
commit
c213b21bee
@ -27,6 +27,7 @@ const BaseService = require("./src/services/BaseService.js");
|
||||
const { Context } = require("./src/util/context.js");
|
||||
const { TestDriversModule } = require("./src/modules/test-drivers/TestDriversModule.js");
|
||||
const { PuterAIModule } = require("./src/modules/puterai/PuterAIModule.js");
|
||||
const { BroadcastModule } = require("./src/modules/broadcast/BroadcastModule.js");
|
||||
|
||||
|
||||
module.exports = {
|
||||
@ -50,4 +51,5 @@ module.exports = {
|
||||
SelfHostedModule,
|
||||
TestDriversModule,
|
||||
PuterAIModule,
|
||||
BroadcastModule,
|
||||
};
|
||||
|
@ -279,9 +279,6 @@ const install = async ({ services, app, useapi }) => {
|
||||
const { ScriptService } = require('./services/ScriptService');
|
||||
services.registerService('script', ScriptService);
|
||||
|
||||
const { BroadcastService } = require('./services/BroadcastService');
|
||||
services.registerService('broadcast', BroadcastService);
|
||||
|
||||
const { NotificationService } = require('./services/NotificationService');
|
||||
services.registerService('notification', NotificationService);
|
||||
|
||||
|
14
src/backend/src/modules/broadcast/BroadcastModule.js
Normal file
14
src/backend/src/modules/broadcast/BroadcastModule.js
Normal file
@ -0,0 +1,14 @@
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
class BroadcastModule extends AdvancedBase {
|
||||
async install (context) {
|
||||
const services = context.get('services');
|
||||
|
||||
const { BroadcastService } = require('./BroadcastService');
|
||||
services.registerService('broadcast', BroadcastService);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
BroadcastModule,
|
||||
};
|
@ -17,9 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { Endpoint } = require("../util/expressutil");
|
||||
const { UserActorType } = require("./auth/Actor");
|
||||
const BaseService = require("./BaseService");
|
||||
const BaseService = require("../../services/BaseService");
|
||||
|
||||
class KeyPairHelper extends AdvancedBase {
|
||||
static MODULES = {
|
@ -84,6 +84,7 @@ const main = async () => {
|
||||
DatabaseModule,
|
||||
LocalDiskStorageModule,
|
||||
SelfHostedModule,
|
||||
BroadcastModule,
|
||||
TestDriversModule,
|
||||
PuterAIModule,
|
||||
} = (await import('@heyputer/backend')).default;
|
||||
@ -95,6 +96,7 @@ const main = async () => {
|
||||
k.add_module(new DatabaseModule());
|
||||
k.add_module(new LocalDiskStorageModule());
|
||||
k.add_module(new SelfHostedModule());
|
||||
k.add_module(new BroadcastModule());
|
||||
k.add_module(new TestDriversModule());
|
||||
// k.add_module(new PuterAIModule());
|
||||
k.boot();
|
||||
|
Loading…
Reference in New Issue
Block a user