Skip to content

Commit

Permalink
N21-2191 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrikallab committed Oct 9, 2024
1 parent 0d5ce48 commit 4e3f00b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,13 @@ export class ExternalToolUc {
// Use secrets from existing config
const updatedConfigProps: ExternalToolConfig = { ...currentExternalTool.config, ...externalToolUpdateProps.config };

const { isLti11Config } = ExternalTool;

if (
ExternalTool.isLti11Config(updatedConfigProps) &&
ExternalTool.isLti11Config(currentExternalTool.config) &&
updatedConfigProps.secret !== currentExternalTool.config.secret
(isLti11Config(updatedConfigProps) &&
isLti11Config(currentExternalTool.config) &&
updatedConfigProps.secret !== currentExternalTool.config.secret) ||
(!isLti11Config(currentExternalTool.config) && isLti11Config(updatedConfigProps))
) {
updatedConfigProps.secret = this.encryptionService.encrypt(updatedConfigProps.secret);
}
Expand Down

0 comments on commit 4e3f00b

Please sign in to comment.