refactor: change endpoint url to get user public info

This commit is contained in:
Linventif 2024-02-27 03:52:51 +01:00
parent 88b5505550
commit 8f4249a68d
No known key found for this signature in database
GPG Key ID: FAC0CA60F9AEEC24
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ function gmInte.openVerifPopup()
local button = vgui.Create("DButton")
button:SetText("Refresh Verification")
button.DoClick = function()
gmInte.http.get("/players/" .. LocalPlayer():SteamID64(), function(code, body)
gmInte.http.get("/users/" .. LocalPlayer():SteamID64(), function(code, body)
gmInte.SendNet("verifyMe")
frame:Close()
end,

View File

@ -14,7 +14,7 @@ local function getAPIURL(endpoint)
if (SERVER) then
url = url .. "/servers/" .. gmInte.config.id
else
if (string.sub(endpoint, 1, 8) == "/players" || string.sub(endpoint, 1, 7) == "/errors") then
if (string.sub(endpoint, 1, 8) == "/users") then
return url .. endpoint
end