From 131680b7430943c57fe559713a348a62489a4d59 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 22 Mar 2023 15:46:46 -0500 Subject: [PATCH 1/2] chore: add typescript api for ssh config --- site/src/api/api.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/src/api/api.ts b/site/src/api/api.ts index 210db89a29608..e0dbbf3e5bf86 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -832,6 +832,11 @@ export const getAgentListeningPorts = async ( return response.data } +export const getSSHConfig = async (): Promise => { + const response = await axios.get(`/api/v2/deployment/ssh`) + return response.data +} + export const getDeploymentValues = async (): Promise => { const response = await axios.get(`/api/v2/deployment/config`) return response.data From 7d206d65a7c2ac1c08b03538c07d0088ae6596d6 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Thu, 23 Mar 2023 10:57:49 -0500 Subject: [PATCH 2/2] Rename function and add comments --- site/src/api/api.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/site/src/api/api.ts b/site/src/api/api.ts index e0dbbf3e5bf86..3304ed395cc8b 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -832,10 +832,12 @@ export const getAgentListeningPorts = async ( return response.data } -export const getSSHConfig = async (): Promise => { - const response = await axios.get(`/api/v2/deployment/ssh`) - return response.data -} +// getDeploymentSSHConfig is used by the VSCode-Extension. +export const getDeploymentSSHConfig = + async (): Promise => { + const response = await axios.get(`/api/v2/deployment/ssh`) + return response.data + } export const getDeploymentValues = async (): Promise => { const response = await axios.get(`/api/v2/deployment/config`)