diff --git a/src/DAO/MemoryAuthDAO.cpp b/src/DAO/MemoryAuthDAO.cpp index 8c9d71f..3b5561a 100644 --- a/src/DAO/MemoryAuthDAO.cpp +++ b/src/DAO/MemoryAuthDAO.cpp @@ -27,10 +27,10 @@ bool MemoryAuthDAO::HasAuthorized(const std::string& auth_token) bool MemoryAuthDAO::Logout(const std::string& auth_token) { - string user_uuid = auth_tokens_to_users_uuids_[auth_token]; - if (!HasAuthorized(auth_token)) return false; + string user_uuid = auth_tokens_to_users_uuids_[auth_token]; + users_uuids_to_auth_tokens_.erase(user_uuid); auth_tokens_to_users_uuids_.erase(auth_token);