mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-27 21:04:45 +00: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 parent
835151162f
commit
f406cebcc8
1 file changed
+2
-2
@@ -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