Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit d40fcb4

Browse files
#627 - correct the url used to check for existence of non third party skill
1 parent 9be1a6a commit d40fcb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/components/ProfileCard/helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async function checkIfSkillExists(apiClient, skillProviderId, skillExternalId) {
2525
}
2626

2727
// The external id of the skill could also be its id field - try querying for it instead
28-
url = `${config.API_URL}/skills?skillProviderId=${skillProviderId}&skillId=${skillExternalId}`;
28+
url = `${config.API_URL}/skills/${skillExternalId}`;
2929

3030
try {
3131
response = await apiClient.get(url);
@@ -34,7 +34,7 @@ async function checkIfSkillExists(apiClient, skillProviderId, skillExternalId) {
3434
// TODO - handle error
3535
}
3636

37-
if (response.data) {
37+
if (response.data && response.data.skillProviderId === skillProviderId) {
3838
return response.data;
3939
}
4040

0 commit comments

Comments
 (0)