diff --git a/internal/cli/universal_login_customize.go b/internal/cli/universal_login_customize.go index bf6c595d6..8faf75823 100644 --- a/internal/cli/universal_login_customize.go +++ b/internal/cli/universal_login_customize.go @@ -26,6 +26,7 @@ const ( fetchPromptMessageType = "FETCH_PROMPT" saveBrandingMessageType = "SAVE_BRANDING" errorMessageType = "ERROR" + successMessageType = "SUCCESS" ) type ( @@ -53,6 +54,10 @@ type ( Error string `json:"error"` } + successData struct { + Success bool `json:"success"` + } + webSocketHandler struct { shutdown context.CancelFunc display *display.Renderer @@ -504,6 +509,17 @@ func (h *webSocketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { continue } + + successMsg := webSocketMessage{ + Type: successMessageType, + Payload: &successData{ + Success: true, + }, + } + + if err := connection.WriteJSON(&successMsg); err != nil { + h.display.Errorf("Failed to send success message: %v", err) + } } } }