Skip to content

feat: use ENVIRONMENT variable for Apricot API environment detection#115

Merged
fg-nava merged 2 commits intolabs-aspfrom
feat/apricot-separate-credentials
Feb 3, 2026
Merged

feat: use ENVIRONMENT variable for Apricot API environment detection#115
fg-nava merged 2 commits intolabs-aspfrom
feat/apricot-separate-credentials

Conversation

@fg-nava
Copy link
Copy Markdown
Collaborator

@fg-nava fg-nava commented Feb 3, 2026

  • Switch from NEXTAUTH_URL to ENVIRONMENT variable for determining prod vs sandbox
  • Add debug logging for environment detection
  • Update .env.example with documentation about separate credentials

- Switch from NEXTAUTH_URL to ENVIRONMENT variable for determining prod vs sandbox
- Add debug logging for environment detection
- Update .env.example with documentation about separate credentials
Comment thread lib/apricot-api.ts
// ===== Configuration =====
// Use 'api' for production only (https://labs-asp.navateam.com), 'sandbox' for all other environments including dev
const env = process.env.NEXTAUTH_URL?.includes('://labs-asp.navateam.com') ? 'api' : 'sandbox';
// Use 'api' for production only (ENVIRONMENT=prod), 'sandbox' for all other environments including dev
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

whoops sorry - I just merged this in

@fg-nava fg-nava merged commit 287d855 into labs-asp Feb 3, 2026
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.

2 participants