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:
parent
536e9bbd31
commit
f49d3aeb6d
@ -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) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user