mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 23:46:03 +01:00
refactor(version/server): reliable resource name check
So people can rename resources and pretend they're custom made, without getting an error.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
function lib.versionCheck(repository)
|
function lib.versionCheck(repository)
|
||||||
SetTimeout(1000, function()
|
local resource = GetInvokingResource() or GetCurrentResourceName()
|
||||||
local resource = repository:sub(repository:find('/') + 1, #repository)
|
|
||||||
|
|
||||||
|
SetTimeout(1000, function()
|
||||||
PerformHttpRequest(('https://api.github.com/repos/%s/releases/latest'):format(repository), function(status, response)
|
PerformHttpRequest(('https://api.github.com/repos/%s/releases/latest'):format(repository), function(status, response)
|
||||||
if status ~= 200 then return end
|
if status ~= 200 then return end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user