feat: [AH-704]: Update Client-Setup API response (#3056)

* feat: [AH-704]: Update Client-Setup API response
pull/3597/head
Ritek Rounak 2024-11-27 08:54:36 +00:00 committed by Harness
parent 7765cf0d2f
commit dbe74b149d
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,7 @@ func (c *APIController) GenerateClientSetupDetails(
) *artifact.ClientSetupDetailsResponseJSONResponse {
session, _ := request.AuthSessionFrom(ctx)
username := session.Principal.Email
loginUsernameLabel := "Username: "
loginUsernameLabel := "Username: <USERNAME>"
loginUsernameValue := "<USERNAME>"
loginPasswordLabel := "Password: *see step 2*"
blankString := ""
@ -320,6 +320,7 @@ func replaceText(
) {
if username != "" {
(*st.Commands)[i].Value = stringPtr(strings.ReplaceAll(*(*st.Commands)[i].Value, "<USERNAME>", username))
(*st.Commands)[i].Label = stringPtr(strings.ReplaceAll(*(*st.Commands)[i].Label, "<USERNAME>", username))
}
if hostname != "" {
(*st.Commands)[i].Value = stringPtr(strings.ReplaceAll(*(*st.Commands)[i].Value, "<HOSTNAME>", hostname))