mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 22:07:34 +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")
|
local button = vgui.Create("DButton")
|
||||||
button:SetText("Refresh Verification")
|
button:SetText("Refresh Verification")
|
||||||
button.DoClick = function()
|
button.DoClick = function()
|
||||||
gmInte.http.get("/players/" .. LocalPlayer():SteamID64(), function(code, body)
|
gmInte.http.get("/users/" .. LocalPlayer():SteamID64(), function(code, body)
|
||||||
gmInte.SendNet("verifyMe")
|
gmInte.SendNet("verifyMe")
|
||||||
frame:Close()
|
frame:Close()
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -14,7 +14,7 @@ local function getAPIURL(endpoint)
|
||||||
if (SERVER) then
|
if (SERVER) then
|
||||||
url = url .. "/servers/" .. gmInte.config.id
|
url = url .. "/servers/" .. gmInte.config.id
|
||||||
else
|
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
|
return url .. endpoint
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user