fix MP.HttpGET (was not passing contentType)

This commit is contained in:
Lion Kortlepel 2021-10-08 08:44:20 +02:00
parent 577d4c429d
commit c4d6aab08b
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B
2 changed files with 2 additions and 1 deletions

View File

@ -134,7 +134,7 @@ std::string GenericRequest(http::verb verb, const std::string& host, int port, c
}
std::string Http::GET(const std::string& host, int port, const std::string& target, unsigned int* status) {
return GenericRequest(http::verb::get, host, port, target, {}, {}, {}, status);
return GenericRequest(http::verb::get, host, port, target, {}, {}, content_type, status);
}
std::string Http::POST(const std::string& host, int port, const std::string& target, const std::unordered_map<std::string, std::string>& fields, const std::string& body, const std::string& ContentType, unsigned int* status) {

View File

@ -282,6 +282,7 @@ void TServer::ParseVehicle(TClient& c, const std::string& Pckt, TNetwork& Networ
c.SetUnicycleID(-1);
}
Network.SendToAll(nullptr, Packet, true, true);
// TODO: should this trigger on all vehicle deletions?
LuaAPI::MP::Engine->ReportErrors(LuaAPI::MP::Engine->TriggerEvent("onVehicleDeleted", "", c.GetID(), VID));
c.DeleteCar(VID);
beammp_debug(c.GetName() + (" deleted car with ID ") + std::to_string(VID));