Skip to content

fix: remove dolar sign#680

Merged
EllaMartirosyan merged 2 commits into
masterfrom
fix-geocoder-template-userId
Oct 26, 2025
Merged

fix: remove dolar sign#680
EllaMartirosyan merged 2 commits into
masterfrom
fix-geocoder-template-userId

Conversation

@Eliav-Maimon
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the dollar sign ($) from template placeholders used for dynamic user ID replacement, changing the placeholder format from ${CURRENT_USER} to {CURRENT_USER} across the codebase.

Key Changes

  • Updated the string replacement pattern in the discrete layer view to match the new placeholder format
  • Modified configuration files and templates to use the new {CURRENT_USER} placeholder format consistently

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/discrete-layer/views/discrete-layer-view.tsx Updated replace() call to search for {CURRENT_USER} instead of ${CURRENT_USER}
src/mocks/confEnvShim.js Changed mock configuration to use new placeholder format
helm/values.yaml Updated Helm values to reflect new placeholder format
confd/production.tmpl Modified production template default value to use new placeholder format

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if (!CONFIG.GEOCODER.CALLBACK_URL) return;

const CATALOG_APP_USER_ID = CONFIG.CATALOG_APP_USER_ID.replace('${CURRENT_USER}', store.userStore?.user?.role as string);
const CATALOG_APP_USER_ID = CONFIG.CATALOG_APP_USER_ID.replace('{CURRENT_USER}', store.userStore?.user?.role as string);
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

The replace() method only replaces the first occurrence. If CATALOG_APP_USER_ID contains multiple instances of {CURRENT_USER}, only the first will be replaced. Consider using replaceAll('{CURRENT_USER}', ...) or a global regex pattern .replace(/{CURRENT_USER}/g, ...) to ensure all occurrences are replaced.

Suggested change
const CATALOG_APP_USER_ID = CONFIG.CATALOG_APP_USER_ID.replace('{CURRENT_USER}', store.userStore?.user?.role as string);
const CATALOG_APP_USER_ID = CONFIG.CATALOG_APP_USER_ID.replaceAll('{CURRENT_USER}', store.userStore?.user?.role as string);

Copilot uses AI. Check for mistakes.
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