Skip to content

Refactor magazine URL retrieval#65

Merged
natlibfi-psams merged 1 commit intomainfrom
ekir-747-configurable-env-for-magazines
Feb 18, 2026
Merged

Refactor magazine URL retrieval#65
natlibfi-psams merged 1 commit intomainfrom
ekir-747-configurable-env-for-magazines

Conversation

@natlibfi-psams
Copy link
Collaborator

Description

This pull request improves the way the application selects magazine API and reader URLs based on the environment. Instead of relying solely on NODE_ENV, it uses NEXT_PUBLIC_MAGAZINES_ENV.

Changes:

  • Read NEXT_PUBLIC_MAGAZINES_ENV in docker-compose.yml to explicitly set the magazines environment (production or playground).
  • Refactored getMagazineReaderUrl and getMagazineApiUrl in src/config/magazines.ts to use NEXT_PUBLIC_MAGAZINES_ENV variable if set, falling back to NODE_ENV as before. This makes it easier to test different environments without changing the overall app environment.

Copy link
Contributor

@natlibfi-burger natlibfi-burger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@natlibfi-psams natlibfi-psams merged commit e04731e into main Feb 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants