Skip to content

Commit 8877e4f

Browse files
authored
fix(aurora-portal): use relative path for fetching flavors (#351)
* fix(aurora-portal): use relative path for fetching flavors * fix(aurora-portal): resolve test failures caused by recent path change
1 parent ba4eee2 commit 8877e4f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

apps/aurora-portal/src/server/Compute/helpers/flavorHelpers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe("fetchFlavors", () => {
9797

9898
const flavors = await fetchFlavors(mockCompute)
9999
expect(flavors).toEqual(mockFlavors)
100-
expect(mockCompute.get).toHaveBeenCalledWith("/compute/v2.1/flavors/detail")
100+
expect(mockCompute.get).toHaveBeenCalledWith("flavors/detail")
101101
})
102102

103103
it("should throw PARSE_ERROR if Zod parsing fails", async () => {

apps/aurora-portal/src/server/Compute/helpers/flavorHelpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export function includesSearchTerm(flavor: Flavor, searchTerm: string): boolean
1414
}
1515

1616
export async function fetchFlavors(compute: ComputeService): Promise<Flavor[]> {
17-
const response = await compute.get("/compute/v2.1/flavors/detail")
17+
const response = await compute.get("flavors/detail")
18+
1819
if (!response.ok) {
1920
const statusCode = response.status
2021

0 commit comments

Comments
 (0)