Skip to content

Commit

Permalink
Update civintegration version to 1.1.2 and handle error in GET_CHARAC…
Browse files Browse the repository at this point in the history
…TERS API request
  • Loading branch information
Jordan2139 committed Dec 11, 2023
1 parent 92bb1f7 commit e173cdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions civintegration/sv_civintegration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if pluginConfig.enabled then
return
end
local payload = { ['apiId'] = apiId }
performApiRequest({payload}, "GET_CHARACTERS", function(result)
if result ~= nil then
performApiRequest({payload}, "GET_CHARACTERS", function(result, error)
if result ~= nil and error ~= 404 then
local characters = {}
for _, records in pairs(json.decode(result)) do
local charData = {}
Expand Down Expand Up @@ -123,7 +123,7 @@ if pluginConfig.enabled then
RegisterCommand("setid", function(source, args, rawCommand)
TriggerClientEvent("SonoranCAD::civintegration:SetCustomId", source)
end)

RegisterCommand("resetid", function(source, args, rawCommand)
if CustomCharacterCache[source] ~= nil then
CustomCharacterCache[source] = nil
Expand All @@ -145,5 +145,5 @@ if pluginConfig.enabled then
end
end


end
2 changes: 1 addition & 1 deletion civintegration/version_civintegration.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.1",
"version": "1.1.2",
"check_url": "https://raw.githubusercontent.com/Sonoran-Software/sonoran_civintegration/master/civintegration/version_civintegration.json",
"download_url": "https://github.com/Sonoran-Software/sonoran_civintegration/",
"configVersion": "1.1"
Expand Down

0 comments on commit e173cdb

Please sign in to comment.