Skip to content

Conversation

@jmgasper
Copy link
Contributor

@jmgasper jmgasper commented Nov 5, 2025

@jmgasper jmgasper merged commit ddce0e7 into master Nov 5, 2025
5 of 6 checks passed
* @returns application domain such as topcoder-dev.com
*/
static getAppDomain(
configService?: { get<T = any>(key: string): T | undefined },
Copy link

Choose a reason for hiding this comment

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

[⚠️ maintainability]
The configService parameter is defined but never used in the function. Consider removing it if it's not needed, or utilize it to fetch configuration values if intended.

static getAppDomain(
configService?: { get<T = any>(key: string): T | undefined },
): string {
const envDomain = process.env.APP_DOMAIN;
Copy link

Choose a reason for hiding this comment

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

[⚠️ design]
Accessing environment variables directly within the function can make testing more difficult. Consider passing the environment variables as parameters or using dependency injection to improve testability.

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