Skip to content

Commit

Permalink
Update auth.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Shxde1 authored Mar 23, 2024
1 parent 90a0b42 commit 2de30ae
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions auth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -63,13 +58,29 @@ namespace KeyAuth {
std::string lastlogin;

std::vector<subscriptions_class> 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<channel_struct> channeldata;
bool success;
bool success{};
std::string message;
};
data_class data;

userdata user_data;
appdata app_data;
responsedata response;

private:
std::string sessionid, enckey;
Expand Down

0 comments on commit 2de30ae

Please sign in to comment.