From 36dac56bbaf75662dc970f66d51d6a34494dce3c Mon Sep 17 00:00:00 2001 From: Mosh Date: Fri, 14 Feb 2025 12:35:16 +0100 Subject: [PATCH] TD-66 CodeCleanup3.0 --- scripts/login/v_box_container.gd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/login/v_box_container.gd b/scripts/login/v_box_container.gd index 88d6993..b4104eb 100644 --- a/scripts/login/v_box_container.gd +++ b/scripts/login/v_box_container.gd @@ -5,20 +5,22 @@ var password = "" var url: String = "http://localhost:8080/api/v1/player/login" var headers = ["Content-Type: application/json"] + func _on_username_input_text_changed(new_text: String) -> void: username = new_text - + func _on_password_input_text_changed(new_text: String) -> void: password = new_text - func _on_button_button_up() -> void: var loginData = {"username": username, "password": password} var json = JSON.stringify(loginData) $HTTPRequest.request(url, headers, HTTPClient.METHOD_POST, json) - -func _on_http_request_request_completed( result: int, response_code: int, headers: PackedStringArray, body: PackedByteArray) -> void: + +func _on_http_request_request_completed( + result: int, response_code: int, headers: PackedStringArray, body: PackedByteArray +) -> void: print(body.get_string_from_utf8())