From 847156a1469db5614acd75061cf54c0aac07e7bf Mon Sep 17 00:00:00 2001 From: Samuel Williams <33094920+samuelWilliams99@users.noreply.github.com> Date: Sun, 6 Dec 2020 23:37:41 +0000 Subject: [PATCH] Account for new api response --- lua/cfc_disconnect_interface/client/cl_api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/cfc_disconnect_interface/client/cl_api.lua b/lua/cfc_disconnect_interface/client/cl_api.lua index 8e7d424..d837d79 100644 --- a/lua/cfc_disconnect_interface/client/cl_api.lua +++ b/lua/cfc_disconnect_interface/client/cl_api.lua @@ -90,11 +90,11 @@ local function triggerPing() function( body, size, headers, code ) local data = util.JSONToTable( body ) -- If response is malformed, or empty, set cfc false - if not data or data["server-is-up"] == nil then -- Can't use dot notation cuz api field has dashes >:( + if not data or data.status == nil then -- Can't use dot notation cuz api field has dashes >:( responses.cfc = false handleResponses() else - responses.cfc = data["server-is-up"] + responses.cfc = data.status == "server-is-up" handleResponses() end end,