Skip to content

Commit

Permalink
fix: spid logo retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowsheep1 committed Apr 30, 2024
1 parent af97362 commit 7719d77
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
Binary file added assets/spid/idps/spid-idp-etnaid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/spid/idps/spid-idp-infocamereid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/spid/idps/spid-idp-intesigroupspid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/spid/idps/spid-idp-teamsystemid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions src/routers/services_metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,14 @@ addHandler(
},
idps => {
// set the logo url as server local resource
const idpsWithLogo = idps.items.map(idp => ({
...idp,
logo: `${serverUrl}${staticContentRootPath}/logos/spid/idps/spid-idp-${idp.id}.png`
}));
const idpsWithLogo = idps.items.map(idp => {
const urlSegments = idp.logo.split("/");
const logoImageName = urlSegments[urlSegments.length - 1];
return {
...idp,
logo: `${serverUrl}${staticContentRootPath}/logos/spid/idps/${logoImageName}`
};
});
res.json({ ...idps, items: idpsWithLogo });
}
)
Expand Down

0 comments on commit 7719d77

Please sign in to comment.