Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/gepgerrorhandling and clinic medication on dose #490

Merged
merged 4 commits into from
Nov 28, 2024

Conversation

iamgaspardev
Copy link
Collaborator

No description provided.

@@ -356,6 +356,8 @@
parametersString += `&includeInactive=true`;
}
//

console.log("url fired ...",`icare/visit?${parametersString.replace("&","" )}&startIndex=${startIndex}&limit=${limit}`);

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of "&".

Copilot Autofix AI 2 months ago

To fix the problem, we need to ensure that all occurrences of the & character in parametersString are replaced. This can be achieved by using a regular expression with the global flag (g). This change will ensure that every instance of & is replaced, not just the first one.

Suggested changeset 1
ui/src/app/shared/resources/visits/services/visits.service.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/ui/src/app/shared/resources/visits/services/visits.service.ts b/ui/src/app/shared/resources/visits/services/visits.service.ts
--- a/ui/src/app/shared/resources/visits/services/visits.service.ts
+++ b/ui/src/app/shared/resources/visits/services/visits.service.ts
@@ -359,3 +359,3 @@
     
-    console.log("url fired  ...",`icare/visit?${parametersString.replace("&","" )}&startIndex=${startIndex}&limit=${limit}`);
+    console.log("url fired  ...",`icare/visit?${parametersString.replace(/&/g,"" )}&startIndex=${startIndex}&limit=${limit}`);
     return (
@@ -371,6 +371,6 @@
         : this.httpClient.get(
-            `icare/visit?${parametersString.replace(
-              "&",
-              ""
-            )}&startIndex=${startIndex}&limit=${limit}`
+            `icare/visit?${parametersString.replace(
+              /&/g,
+              ""
+            )}&startIndex=${startIndex}&limit=${limit}`
           )
EOF
@@ -359,3 +359,3 @@

console.log("url fired ...",`icare/visit?${parametersString.replace("&","" )}&startIndex=${startIndex}&limit=${limit}`);
console.log("url fired ...",`icare/visit?${parametersString.replace(/&/g,"" )}&startIndex=${startIndex}&limit=${limit}`);
return (
@@ -371,6 +371,6 @@
: this.httpClient.get(
`icare/visit?${parametersString.replace(
"&",
""
)}&startIndex=${startIndex}&limit=${limit}`
`icare/visit?${parametersString.replace(
/&/g,
""
)}&startIndex=${startIndex}&limit=${limit}`
)
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@iamgaspardev iamgaspardev merged commit 2bc1042 into develop Nov 28, 2024
1 of 2 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.

1 participant