Modify data before sending it

This commit is contained in:
powermaker450 2024-06-23 22:44:36 -04:00
parent 0cec8101b6
commit 787fe1aa46

View file

@ -73,7 +73,7 @@ class Panel:
# #
# Panel('https://panel.domain.com', 'randomClientId', 'randomSecretKey') # Panel('https://panel.domain.com', 'randomClientId', 'randomSecretKey')
def invalidCode(self, given: object, override=False) -> bool: def invalidCode(self, given: requests.Response, override=False) -> bool:
validCodes = [] validCodes = []
for i in range(200, 300): for i in range(200, 300):
validCodes.append(i) validCodes.append(i)
@ -398,6 +398,8 @@ class Panel:
f"'{key}' does not match any in the options list:\n{options}" f"'{key}' does not match any in the options list:\n{options}"
) )
reply[key]["value"] = value
response = requests.post( response = requests.post(
fullURL, data=json.dumps({"data": reply}), headers=data[1] fullURL, data=json.dumps({"data": reply}), headers=data[1]
) )