Skip to content

Commit

Permalink
Always add authorization service
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed Feb 11, 2022
1 parent 90bd578 commit 763178e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions server/services/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { RoomService } from './room/service';
import { SAUMonitorService } from './sauMonitor/service';
import { TeamService } from './team/service';
import { UiKitCoreApp } from './uikit-core-app/service';
import { Authorization } from './authorization/service';

const { db } = MongoInternals.defaultRemoteCollectionDriver().mongo;

Expand All @@ -28,13 +29,15 @@ api.registerService(new RoomService(db));
api.registerService(new SAUMonitorService());
api.registerService(new TeamService(db));
api.registerService(new UiKitCoreApp());
api.registerService(new Authorization(db));

// TODO need to implement something to make this work
// if TRANSPORTER env var it means the process is running in micro services mode
// in that case we don't need to register services that will run separately
if (!process.env.TRANSPORTER?.match(/^(?:nats|TCP)/)) {
(async (): Promise<void> => {
const { Authorization } = await import('./authorization/service');
// if (!process.env.TRANSPORTER?.match(/^(?:nats|TCP)/)) {
// (async (): Promise<void> => {
// const { Authorization } = await import('./authorization/service');

api.registerService(new Authorization(db));
})();
}
// api.registerService(new Authorization(db));
// })();
// }

0 comments on commit 763178e

Please sign in to comment.