@oondemand/oon-core-back 0.3.59 → 0.3.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oondemand/oon-core-back",
3
- "version": "0.3.59",
3
+ "version": "0.3.60",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/oondemand/oon-platform.git",
@@ -10,6 +10,7 @@ const DEFAULT_BASE_URL = "https://app.omie.com.br/api/v1";
10
10
  function encryptionSecret() {
11
11
  return String(
12
12
  process.env.OON_CREDENTIALS_ENCRYPTION_KEY
13
+ || process.env.INSTANCE_CREDENTIAL_ENCRYPTION_KEY
13
14
  || process.env.OMIE_CREDENTIALS_ENCRYPTION_KEY
14
15
  || "",
15
16
  ).trim();
@@ -19,7 +20,7 @@ function encryptionKey() {
19
20
  const secret = encryptionSecret();
20
21
  if (!secret) {
21
22
  throw new GenericError(
22
- "Configure OON_CREDENTIALS_ENCRYPTION_KEY para persistir credenciais Omie.",
23
+ "Configure OON_CREDENTIALS_ENCRYPTION_KEY ou disponibilize INSTANCE_CREDENTIAL_ENCRYPTION_KEY para persistir credenciais Omie.",
23
24
  { statusCode: 503 },
24
25
  );
25
26
  }