Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions auth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ namespace KeyAuth {
void load_channel_data(nlohmann::json data) {
api::data.success = data["success"];
api::data.message = data["message"];
for (auto sub : data["messages"])
{
std::string authoroutput = sub[("author")];
std::string messageoutput = sub[("message")];
std::string timestampoutput = sub[("timestamp")];
for (const auto sub : data["messages"]) {

std::string authoroutput = sub["author"];
std::string messageoutput = sub["message"];
int timestamp = sub["timestamp"]; std::string timestampoutput = std::to_string(timestamp);
authoroutput.erase(remove(authoroutput.begin(), authoroutput.end(), '"'), authoroutput.end());
messageoutput.erase(remove(messageoutput.begin(), messageoutput.end(), '"'), messageoutput.end());
timestampoutput.erase(remove(timestampoutput.begin(), timestampoutput.end(), '"'), timestampoutput.end());
Expand Down