modify api (no google and using custom json)
This commit is contained in:
parent
5ec788afcb
commit
9050a8eb9b
@ -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 )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user