Skip to content

Commit eae04fd

Browse files
committed
one more change
1 parent 8635a36 commit eae04fd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

internal/app/websocket.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,19 @@ func StartWebSocket(url string) {
117117
return
118118
}
119119

120+
// Print the raw message for debugging
121+
color.Cyan("[DEBUG] Received WebSocket message: %s", string(message))
122+
120123
var response map[string]interface{}
121124
if err := json.Unmarshal(message, &response); err != nil {
122125
color.Red("Error unmarshalling WebSocket message: %v", err)
123126
WsAuthenticated <- false
124127
return
125128
}
126129

130+
// Print the parsed response for debugging
131+
color.Cyan("[DEBUG] Parsed WebSocket response: %+v", response)
132+
127133
if loggedIn, ok := response["logged_in"].(bool); ok && loggedIn {
128134
if insertToken, ok := response["insert_token"].(string); ok {
129135
// Save the token

0 commit comments

Comments
 (0)