fix: clients url

This commit is contained in:
Linventif 2024-05-22 21:10:19 +02:00
parent 581c270446
commit b4b93ffd1d
No known key found for this signature in database
GPG Key ID: FAC0CA60F9AEEC24
4 changed files with 6 additions and 6 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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
if (CLIENT) then
endpoint = string.gsub(endpoint, ":steamID64", LocalPlayer():SteamID64())
end