Fix ExecVoteRequest sending AuthHeaders multiple times
Doesn't seem to affect libcurl, somehow.
This commit is contained in:
parent
0f418ec195
commit
2bc2acc00e
@ -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 },
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user