diff --git a/migrations/1702667624000-rename-nordigen-secrets.js b/migrations/1702667624000-rename-nordigen-secrets.js deleted file mode 100644 index df95c8a3d..000000000 --- a/migrations/1702667624000-rename-nordigen-secrets.js +++ /dev/null @@ -1,19 +0,0 @@ -import getAccountDb from '../src/account-db.js'; - -export const up = async function () { - await getAccountDb().exec( - `UPDATE secrets SET name = "gocardless_secretId" WHERE name = "nordigen_secretId"`, - ); - await getAccountDb().exec( - `UPDATE secrets SET name = "gocardless_secretKey" WHERE name = "nordigen_secretKey" `, - ); -}; - -export const down = async function () { - await getAccountDb().exec( - `UPDATE secrets SET name = "nordigen_secretId" WHERE name = "gocardless_secretId"`, - ); - await getAccountDb().exec( - `UPDATE secrets SET name = "nordigen_secretKey" WHERE name = "gocardless_secretKey" `, - ); -}; diff --git a/src/app-gocardless/services/gocardless-service.js b/src/app-gocardless/services/gocardless-service.js index 263045927..e7b59a322 100644 --- a/src/app-gocardless/services/gocardless-service.js +++ b/src/app-gocardless/services/gocardless-service.js @@ -22,8 +22,8 @@ const clients = new Map(); const getGocardlessClient = () => { const secrets = { - secretId: secretsService.get(SecretName.gocardless_secretId), - secretKey: secretsService.get(SecretName.gocardless_secretKey), + secretId: secretsService.get(SecretName.nordigen_secretId), + secretKey: secretsService.get(SecretName.nordigen_secretKey), }; const hash = JSON.stringify(secrets); diff --git a/src/app.js b/src/app.js index cf5227585..4c20da83d 100644 --- a/src/app.js +++ b/src/app.js @@ -43,6 +43,7 @@ app.use( app.use('/sync', syncApp.handlers); app.use('/account', accountApp.handlers); +app.use('/nordigen', goCardlessApp.handlers); app.use('/gocardless', goCardlessApp.handlers); app.use('/secret', secretApp.handlers); diff --git a/src/services/secrets-service.js b/src/services/secrets-service.js index 7794060c6..ee64fc5c4 100644 --- a/src/services/secrets-service.js +++ b/src/services/secrets-service.js @@ -7,8 +7,8 @@ import getAccountDb from '../account-db.js'; * @enum {string} */ export const SecretName = { - gocardless_secretId: 'gocardless_secretId', - gocardless_secretKey: 'gocardless_secretKey', + nordigen_secretId: 'nordigen_secretId', + nordigen_secretKey: 'nordigen_secretKey', }; class SecretsDb { diff --git a/upcoming-release-notes/293.md b/upcoming-release-notes/293.md deleted file mode 100644 index 7d835a7ae..000000000 --- a/upcoming-release-notes/293.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -migration: rename `nordigen_*` secrets to `gocardless_*`