add: uptime in report error

This commit is contained in:
Linventif 2024-02-27 02:47:54 +01:00
parent 36e2de1883
commit 88b5505550
No known key found for this signature in database
GPG Key ID: FAC0CA60F9AEEC24

View File

@ -2,9 +2,9 @@
// Methods // Methods
// //
function gmInte.sendLuaErrorReport(err, realm, stack, name, id) function gmInte.sendLuaErrorReport(err, realm, stack, name, id, uptime)
if (name != "gmod_integration") then return end if (name != "gmod_integration") then return end
if (SERVER && math.Round(RealTime()) == 0) then return end if (SERVER && math.Round(RealTime()) == 0) then return timer.Simple(1, function() gmInte.sendLuaErrorReport(err, realm, stack, name, id, math.Round(RealTime())) end) end
gmInte.http.post("/errors", gmInte.http.post("/errors",
{ {
@ -13,6 +13,7 @@ function gmInte.sendLuaErrorReport(err, realm, stack, name, id)
["stack"] = stack, ["stack"] = stack,
["name"] = name, ["name"] = name,
["id"] = id, ["id"] = id,
["uptime"] = uptime || math.Round(RealTime()),
["identifier"] = SERVER && gmInte.config.id || LocalPlayer():SteamID64() ["identifier"] = SERVER && gmInte.config.id || LocalPlayer():SteamID64()
} }
) )