1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

pass clusterId query as param

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann 2021-11-29 11:00:38 -05:00
parent 536e9bbd31
commit f49d3aeb6d

View File

@ -166,8 +166,7 @@ export async function removePortForward(portForward: ForwardedPort) {
export async function getPortForwards(clusterId?: string): Promise<ForwardedPort[]> { export async function getPortForwards(clusterId?: string): Promise<ForwardedPort[]> {
try { try {
const query = clusterId ? `?clusterId=${clusterId}` : ""; const response = await apiBase.get<PortForwardsResult>("/pods/port-forwards", { query: { clusterId }});
const response = await apiBase.get<PortForwardsResult>(`/pods/port-forwards${query}`);
return response.portForwards; return response.portForwards;
} catch (error) { } catch (error) {