fix error of forget to prepare user info
This commit is contained in:
@ -346,6 +346,11 @@ std::string TicketSystemEngine::RefundTicket(const std::string &command) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response_stream << "[" << command_id << "] RefundTicket";
|
hash_t user_ID_hash = SplitMix64Hash(user_name);
|
||||||
|
if (online_users.find(user_ID_hash) == online_users.end()) {
|
||||||
|
response_stream << "[" << command_id << "] -1";
|
||||||
|
return response_stream.str();
|
||||||
|
}
|
||||||
|
response_stream << "[" << command_id << "] 0";
|
||||||
return response_stream.str();
|
return response_stream.str();
|
||||||
}
|
}
|
@ -89,6 +89,7 @@ std::string TicketSystemEngine::AddUser(const std::string &command) {
|
|||||||
strcpy(dat.name, name.c_str());
|
strcpy(dat.name, name.c_str());
|
||||||
strcpy(dat.mailAddr, mailAddr.c_str());
|
strcpy(dat.mailAddr, mailAddr.c_str());
|
||||||
user_data.Put(new_user_username_hash, dat);
|
user_data.Put(new_user_username_hash, dat);
|
||||||
|
transaction_manager.PrepareUserInfo(SplitMix64Hash(username));
|
||||||
LOG->debug("stored user_name hash: {}", new_user_username_hash);
|
LOG->debug("stored user_name hash: {}", new_user_username_hash);
|
||||||
LOG->debug("stored user_name: {}", dat.username);
|
LOG->debug("stored user_name: {}", dat.username);
|
||||||
LOG->debug("stored password hash: {}", dat.password_hash);
|
LOG->debug("stored password hash: {}", dat.password_hash);
|
||||||
|
Reference in New Issue
Block a user