mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-17 09:48:33 +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)
|
||||
SetTimeout(1000, function()
|
||||
local resource = repository:sub(repository:find('/') + 1, #repository)
|
||||
local resource = GetInvokingResource() or GetCurrentResourceName()
|
||||
|
||||
SetTimeout(1000, function()
|
||||
PerformHttpRequest(('https://api.github.com/repos/%s/releases/latest'):format(repository), function(status, response)
|
||||
if status ~= 200 then return end
|
||||
|
||||
|
||||
Reference in new issue
Block a user