pass clusterId query as param

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann committed 2021-11-29 11:00:38 -05:00
1 parent 536e9bbd31
commit f49d3aeb6d
1 file changed
+1 -2
@@ -166,8 +166,7 @@ export async function removePortForward(portForward: ForwardedPort) {
export async function getPortForwards(clusterId?: string): Promise<ForwardedPort[]> {
try {
const query = clusterId ? `?clusterId=${clusterId}` : "";
const response = await apiBase.get<PortForwardsResult>(`/pods/port-forwards${query}`);
const response = await apiBase.get<PortForwardsResult>("/pods/port-forwards", { query: { clusterId }});
return response.portForwards;
} catch (error) {