Skip to content

Commit

Permalink
Unify case in config
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt committed May 14, 2024
1 parent 5f24198 commit 89319e0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ All changes that impact users of this module are documented in this file, in the
### Changed

- **Breaking:** All configurations are now nested under the `@opentermsarchive/engine` key. Update your `config/production.json` by wrapping its content like this: `{ @opentermsarchive/engine: { < your previous configuration >}}`.
- **Breaking:** The `api` configuration key has been renamed to `collection-api`. Update this in your `config/production.json`.
- **Breaking:** Default values for `port` and `basePath` in `collection-api` have been removed. Specify these configurations explicitly in your `config/production.json`.
- **Breaking:** The `api` configuration key has been renamed to `collectionAPI`. Update this in your `config/production.json`.
- **Breaking:** Default values for `port` and `basePath` in `collectionAPI` have been removed. Specify these configurations explicitly in your `config/production.json`.
- **Breaking:** All environment variables are now prefixed with `OTA_ENGINE_`. Update variables such as `SENDINBLUE_API_KEY` to `OTA_ENGINE_SENDINBLUE_API_KEY`, `SMTP_PASSWORD` to `OTA_ENGINE_SMTP_PASSWORD`, and `GITHUB_TOKEN` to `OTA_ENGINE_GITHUB_TOKEN`.

## 1.2.1 - 2024-05-09
Expand Down
2 changes: 1 addition & 1 deletion src/collection-api/routes/docs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import request from 'supertest';

import app from '../server.js';

const basePath = config.get('@opentermsarchive/engine.collection-api.basePath');
const basePath = config.get('@opentermsarchive/engine.collectionAPI.basePath');

describe('Docs API', () => {
describe('GET /docs', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/collection-api/routes/services.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import request from 'supertest';

import app from '../server.js';

const basePath = config.get('@opentermsarchive/engine.collection-api.basePath');
const basePath = config.get('@opentermsarchive/engine.collectionAPI.basePath');

describe('Services API', () => {
describe('GET /services', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/collection-api/routes/versions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Version from '../../archivist/recorder/version.js';
import { toISODateWithoutMilliseconds } from '../../archivist/utils/date.js';
import app from '../server.js';

const basePath = config.get('@opentermsarchive/engine.collection-api.basePath');
const basePath = config.get('@opentermsarchive/engine.collectionAPI.basePath');

const { expect } = chai;
const request = supertest(app);
Expand Down
4 changes: 2 additions & 2 deletions src/collection-api/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ if (process.env.NODE_ENV !== 'test') {
app.use(loggerMiddleware);
}

const BASE_PATH = path.join('/', config.get('@opentermsarchive/engine.collection-api.basePath'), 'v1');
const BASE_PATH = path.join('/', config.get('@opentermsarchive/engine.collectionAPI.basePath'), 'v1');

app.use(BASE_PATH, apiRouter(BASE_PATH));
app.use(errorsMiddleware);

const port = config.get('@opentermsarchive/engine.collection-api.port');
const port = config.get('@opentermsarchive/engine.collectionAPI.port');

app.listen(port);

Expand Down

0 comments on commit 89319e0

Please sign in to comment.