From 2de30ae02f701c2f804ab5389f4b1b6607e53a9c Mon Sep 17 00:00:00 2001 From: Shxde <112267394+Shxde1@users.noreply.github.com> Date: Sat, 23 Mar 2024 19:33:08 -0400 Subject: [PATCH] Update auth.hpp --- auth.hpp | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/auth.hpp b/auth.hpp index 4fd2aeb..12f1e8b 100644 --- a/auth.hpp +++ b/auth.hpp @@ -36,7 +36,7 @@ namespace KeyAuth { void regstr(std::string username, std::string password, std::string key, std::string email = ""); void chatget(std::string channel); bool chatsend(std::string message, std::string channel); - void changeusername(std::string newusername); + void changeUsername(std::string newusername); std::string fetchonline(); void fetchstats(); void forgot(std::string username, std::string email); @@ -47,14 +47,9 @@ namespace KeyAuth { std::string expiry; }; - class data_class { + class userdata { public: - // app data - std::string numUsers; - std::string numOnlineUsers; - std::string numKeys; - std::string version; - std::string customerPanelLink; + // user data std::string username; std::string ip; @@ -63,13 +58,29 @@ namespace KeyAuth { std::string lastlogin; std::vector subscriptions; + }; + class appdata { + public: + // app data + std::string numUsers; + std::string numOnlineUsers; + std::string numKeys; + std::string version; + std::string customerPanelLink; + }; + + class responsedata { + public: // response data std::vector channeldata; - bool success; + bool success{}; std::string message; }; - data_class data; + + userdata user_data; + appdata app_data; + responsedata response; private: std::string sessionid, enckey;