diff --git a/src/client/http/ExecVoteRequest.cpp b/src/client/http/ExecVoteRequest.cpp index 6839ef3d2..0659eb911 100644 --- a/src/client/http/ExecVoteRequest.cpp +++ b/src/client/http/ExecVoteRequest.cpp @@ -8,17 +8,10 @@ namespace http APIRequest(ByteString::Build(SCHEME, SERVER, "/Vote.api"), authRequire, false), direction(newDirection) { - auto user = Client::Ref().GetAuthUser(); - if (!user.UserID) - { - FailEarly("Not authenticated"); - return; - } - AuthHeaders(ByteString::Build(user.UserID), user.SessionID); AddPostData(FormData{ { "ID", ByteString::Build(saveID) }, { "Action", direction ? (direction == 1 ? "Up" : "Down") : "Reset" }, - { "Key", user.SessionKey }, + { "Key", Client::Ref().GetAuthUser().SessionKey }, }); }