From 4149d74c108fc8625f4d18a197fe40ddbd412985 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 25 Nov 2021 12:05:53 +0100 Subject: [PATCH] chore: fix a small issue witih the badge url resolution Signed-off-by: blam --- .changeset/late-coins-eat.md | 5 +++++ plugins/badges/src/api/BadgesClient.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/late-coins-eat.md diff --git a/.changeset/late-coins-eat.md b/.changeset/late-coins-eat.md new file mode 100644 index 0000000000..c23fbc7931 --- /dev/null +++ b/.changeset/late-coins-eat.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-badges': patch +--- + +Fix the path that the Badges client uses towards the `plugin-badges-backend` diff --git a/plugins/badges/src/api/BadgesClient.ts b/plugins/badges/src/api/BadgesClient.ts index 432a485a6b..8ad5d313e4 100644 --- a/plugins/badges/src/api/BadgesClient.ts +++ b/plugins/badges/src/api/BadgesClient.ts @@ -52,7 +52,7 @@ export class BadgesClient implements BadgesApi { private async getEntityBadgeSpecsUrl(entity: Entity): Promise { const routeParams = this.getEntityRouteParams(entity); - const path = generatePath(`:kind/:namespace/:name`, routeParams); + const path = generatePath(`:namespace/:kind/:name`, routeParams); return `${await this.discoveryApi.getBaseUrl( 'badges', )}/entity/${path}/badge-specs`;