mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56: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)
|
||||
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