From 9050a8eb9b16e577216ae534ac39bfa35ee1bd95 Mon Sep 17 00:00:00 2001 From: edshot99 Date: Sun, 1 Dec 2024 15:53:52 -0600 Subject: [PATCH] modify api (no google and using custom json) --- 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 97e63a0..9243ef1 100644 --- a/lua/cfc_disconnect_interface/client/cl_api.lua +++ b/lua/cfc_disconnect_interface/client/cl_api.lua @@ -3,7 +3,7 @@ require( "cfc_promises" ) CFCCrashAPI = {} local endpointCFC = GetConVar( "cfc_disconnect_interface_status_endpoint" ):GetString() -local endpointGlobal = "https://www.google.com" +local endpointGlobal = "https://github.com" local api = CFCCrashAPI @@ -22,7 +22,7 @@ function api._checkCFCEndpoint() if not success then return false end local data = util.JSONToTable( body ) - return tobool( data and data.status == "server-is-up" ) + return tobool( data and data.response.server.online ) end api.checkCFCEndpoint = async( api._checkCFCEndpoint )