diff --git a/apps/server/src/modules/tool/external-tool/entity/index.ts b/apps/server/src/modules/tool/external-tool/entity/index.ts index 22a329f7204..07ade6ea541 100644 --- a/apps/server/src/modules/tool/external-tool/entity/index.ts +++ b/apps/server/src/modules/tool/external-tool/entity/index.ts @@ -2,3 +2,4 @@ export * from './external-tool.entity'; export * from './config'; export * from './custom-parameter'; export { ExternalToolMediumEntity } from './external-tool-medium.entity'; +export { FileRecordRefEmbeddable } from './file-record-ref.embeddable'; diff --git a/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts b/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts index a933dc69de7..6ddeded6833 100644 --- a/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts +++ b/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts @@ -43,7 +43,7 @@ export class ExternalToolService { } public async updateExternalTool(toUpdate: ExternalTool): Promise<ExternalTool> { - // TODO use encryption for secret + // TODO N21-2097 use encryption for secret await this.updateOauth2ToolConfig(toUpdate); const externalTool: ExternalTool = await this.externalToolRepo.save(toUpdate); diff --git a/apps/server/src/modules/tool/tool-launch/service/launch-strategy/lti11-tool-launch.strategy.ts b/apps/server/src/modules/tool/tool-launch/service/launch-strategy/lti11-tool-launch.strategy.ts index 876eb969c7c..30a601f6025 100644 --- a/apps/server/src/modules/tool/tool-launch/service/launch-strategy/lti11-tool-launch.strategy.ts +++ b/apps/server/src/modules/tool/tool-launch/service/launch-strategy/lti11-tool-launch.strategy.ts @@ -62,7 +62,7 @@ export class Lti11ToolLaunchStrategy extends AbstractLaunchStrategy { const additionalProperties: PropertyData[] = [ new PropertyData({ name: 'key', value: config.key }), - // TODO use decryption for secret + // TODO N21-2097 use decryption for secret new PropertyData({ name: 'secret', value: config.secret }), new PropertyData({ name: 'lti_message_type', value: config.lti_message_type, location: PropertyLocation.BODY }), diff --git a/apps/server/src/shared/repo/externaltool/external-tool.repo.spec.ts b/apps/server/src/shared/repo/externaltool/external-tool.repo.spec.ts index be97fefe631..88f57335a34 100644 --- a/apps/server/src/shared/repo/externaltool/external-tool.repo.spec.ts +++ b/apps/server/src/shared/repo/externaltool/external-tool.repo.spec.ts @@ -222,6 +222,7 @@ describe(ExternalToolRepo.name, () => { const ltiToolC: ExternalToolEntity = externalToolEntityFactory.withName('B').buildWithId(); const ltiTools: ExternalToolEntity[] = [ltiToolA, ltiToolB, ltiToolC]; await em.persistAndFlush([ltiToolA, ltiToolB, ltiToolC]); + em.clear(); return { queryExternalToolDO, options, ltiTools }; }; @@ -281,6 +282,14 @@ describe(ExternalToolRepo.name, () => { }); describe('when query is given', () => { + it('should populate thumbnail', async () => { + const { queryExternalToolDO, options } = await setupFind(); + + const page: Page<ExternalTool> = await repo.find(queryExternalToolDO, options); + + expect(page.data[0].thumbnail?.fileName).toBeDefined(); + }); + describe('by ids', () => { it('should return external tools for given ids', async () => { const { options, ltiTools } = await setupFind();