fix: Attach credentialId to location option (#12086)

Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-11-01 09:34:05 -04:00
1 parent 51fd4102ae
commit 3bb42f276e
4 files changed
+33 -9

No files matched your search

+7 -1
View File
@@ -88,7 +88,13 @@ export async function getLocationGroupedOptions(
teamName: credential.team?.name,
}))) {
const label = `${app.locationOption.label} ${teamName ? `(${teamName})` : ""}`;
const option = { ...app.locationOption, label, icon: app.logo, slug: app.slug };
const option = {
...app.locationOption,
label,
icon: app.logo,
slug: app.slug,
...(app.credential ? { credentialId: app.credential.id, teamName: app.credential.team?.name } : {}),
};
if (apps[groupByCategory]) {
apps[groupByCategory] = [...apps[groupByCategory], option];
} else {