Skip to content

Commit

Permalink
fix: Fix Autofill Space in Kudos Drawer - MEED-7630 - Meeds-io/meeds#…
Browse files Browse the repository at this point in the history
…2481 (#540)

Prior to this change, when using Kudos button on Popover, the space
isn't autofilled. This due the fact that the Space is retrieved using
Technical identifier rather than the pretty name. This change will allow
to retrieve the space by both types of identifier.
  • Loading branch information
boubaker authored Oct 11, 2024
1 parent 02bafd1 commit e541ee9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kudos-webapps/src/main/webapp/vue-app/js/KudosIdentity.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ export function getIdentityDetails(urlId, type, remoteId) {
return ownerDetails;
});
} else {
return fetch(`/portal/rest/v1/social/spaces/byPrettyName/${urlId}`, {credentials: 'include'})
const url = Number.isFinite(Number(urlId)) ? `/portal/rest/v1/social/spaces/${urlId}` : `/portal/rest/v1/social/spaces/byPrettyName/${urlId}`;
return fetch(url, {credentials: 'include'})
.then((resp) => resp && resp.ok && resp.json())
.then((identityDetails) => {
if (identityDetails) {
Expand Down

0 comments on commit e541ee9

Please sign in to comment.