mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 17:17:33 +00:00
refactor: change endpoint url to get user public info
This commit is contained in:
parent
88b5505550
commit
8f4249a68d
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user