diff --git a/lua/gmod_integration/client/cl_screenshots.lua b/lua/gmod_integration/client/cl_screenshots.lua index f422cb7..4b486e6 100644 --- a/lua/gmod_integration/client/cl_screenshots.lua +++ b/lua/gmod_integration/client/cl_screenshots.lua @@ -38,7 +38,7 @@ hook.Add("PostRender", "gmInteScreenshot", function() local size = math.Round(string.len(base64Capture) / 1024) gmInte.log("Screenshot Taken - " .. size .. "KB", true) - gmInte.http.post("/client/:steamID64/screenshots", + gmInte.http.post("/clients/:steamID64/servers/:serverID/screenshots", { ["player"] = gmInte.getPlayerFormat(LocalPlayer()), ["screenshot"] = base64Capture, diff --git a/lua/gmod_integration/client/cl_steaming.lua b/lua/gmod_integration/client/cl_steaming.lua index 9b22a96..816cd6d 100644 --- a/lua/gmod_integration/client/cl_steaming.lua +++ b/lua/gmod_integration/client/cl_steaming.lua @@ -24,7 +24,7 @@ hook.Add("PostRender", "gmInte:PostRender:Stream:Frame", function() local size = math.Round(string.len(screenCapture) / 1024) gmInte.log("Frame captured, size: " .. size .. "KB", true) - gmInte.http.post("/client/:steamID64/streams/frames", + gmInte.http.post("/clients/:steamID64/servers/:serverID/streams/frames", { ["player"] = gmInte.getPlayerFormat(LocalPlayer()), ["base64Capture"] = screenCapture, diff --git a/lua/gmod_integration/shared/sh_errors.lua b/lua/gmod_integration/shared/sh_errors.lua index 3fd0b1b..27e4435 100644 --- a/lua/gmod_integration/shared/sh_errors.lua +++ b/lua/gmod_integration/shared/sh_errors.lua @@ -17,7 +17,7 @@ function gmInte.sendLuaErrorReport(err, realm, stack, name, id, uptime) end) end - local endpoint = SERVER && "/servers/:serverID/errors" || "/client/:steamID64/errors" + local endpoint = SERVER && "/servers/:serverID/errors" || "/clients/:steamID64/errors" gmInte.http.post(endpoint, { ["error"] = err, diff --git a/lua/gmod_integration/shared/sh_http.lua b/lua/gmod_integration/shared/sh_http.lua index c6a8a64..e5a2667 100644 --- a/lua/gmod_integration/shared/sh_http.lua +++ b/lua/gmod_integration/shared/sh_http.lua @@ -4,9 +4,9 @@ gmInte.http = gmInte.http || {} local function getAPIURL(endpoint) local url = "https://" .. gmInte.config.apiFQDN .. "/" .. apiVersion - if (SERVER) then - endpoint = string.gsub(endpoint, ":serverID", gmInte.config.id) - else + endpoint = string.gsub(endpoint, ":serverID", gmInte.config.id) + + if (CLIENT) then endpoint = string.gsub(endpoint, ":steamID64", LocalPlayer():SteamID64()) end