@@ -18,8 +18,8 @@ namespace KeyAuth {
1818 std::string name, ownerid, version, url, path;
1919 static bool debug;
2020
21- api (std::string name, std::string ownerid, std::string version, std::string url, std::string path, bool debug = false ) {
22- debug = debug;
21+ api (std::string name, std::string ownerid, std::string version, std::string url, std::string path, bool debugParameter = true ) {
22+ setDebug (debugParameter);
2323 }
2424
2525 void ban (std::string reason = " " );
@@ -108,6 +108,8 @@ namespace KeyAuth {
108108 static std::string req (std::string data, std::string url);
109109
110110 static void debugInfo (std::string data, std::string url, std::string response, std::string headers);
111+
112+ static void setDebug (bool value);
111113
112114
113115 void load_user_data (nlohmann::json data) {
@@ -137,7 +139,7 @@ namespace KeyAuth {
137139 api::app_data.version = data[XorStr (" version" )];
138140 api::app_data.customerPanelLink = data[XorStr (" customerPanelLink" )];
139141 }
140-
142+
141143 void load_response_data (nlohmann::json data) {
142144 api::response.success = data[XorStr (" success" )];
143145 api::response.message = data[" message" ];
0 commit comments