mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
17 lines
675 B
TypeScript
17 lines
675 B
TypeScript
import { DynamicModule } from '@nestjs/common';
|
|
import { getImportPath } from '@modules/app/constants';
|
|
|
|
export class EncryptionModule {
|
|
static async register(configs: { IS_GET_CONTEXT: boolean }): Promise<DynamicModule> {
|
|
const importPath = await getImportPath(configs.IS_GET_CONTEXT);
|
|
const { EncryptionService } = await import(`${importPath}/encryption/service`);
|
|
const { CredentialsService } = await import(`${importPath}/encryption/services/credentials.service`);
|
|
|
|
return {
|
|
module: EncryptionModule,
|
|
imports: [],
|
|
providers: [EncryptionService, CredentialsService],
|
|
exports: [EncryptionService, CredentialsService],
|
|
};
|
|
}
|
|
}
|