This commit is contained in:
codey 2025-02-05 20:25:28 -05:00
parent ec80a33298
commit 9eec1e00c5

View File

@ -28,13 +28,9 @@ class XC(FastAPI):
self.constants = constants self.constants = constants
self.glob_state = glob_state self.glob_state = glob_state
self.ws_endpoints = {
# "aces_ws_put": self.put_ws_handler,
}
self.endpoints = { self.endpoints = {
"xc": self.xc_handler, "xc": self.xc_handler,
#tbd
} }
@ -60,17 +56,12 @@ class XC(FastAPI):
bid = data.bid bid = data.bid
cmd = data.cmd cmd = data.cmd
cmd_data = data.data cmd_data = data.data
req_type = 0 if not self.util.check_key(path=request.url.path, req_type=0, key=key):
if bid in [1]:
req_type = 2
if not self.util.check_key(path=request.url.path, req_type=req_type, key=key):
raise HTTPException(status_code=403, detail="Unauthorized") raise HTTPException(status_code=403, detail="Unauthorized")
BID_ADDR_MAP = { BID_ADDR_MAP = {
0: '10.10.10.101:5991', # Thomas/Aces 0: '10.10.10.101:5991', # Patrick (a.k.a. Thomas a.k.a. Aces)
1: '10.10.10.100:5992' # MS & Waleed Combo # TODO: add Havoc?
} }
if not bid in BID_ADDR_MAP: if not bid in BID_ADDR_MAP: