mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-01 06:00:15 +02:00
Fix ExecVoteRequest sending AuthHeaders multiple times
Doesn't seem to affect libcurl, somehow.
This commit is contained in:
@@ -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 },
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user