diff --git a/upsonic/remote/on_prem.py b/upsonic/remote/on_prem.py index 8e89366..95101bf 100644 --- a/upsonic/remote/on_prem.py +++ b/upsonic/remote/on_prem.py @@ -709,20 +709,12 @@ def set( encryption_key = "u" - data = { - "scope": key, - "code": textwrap.dedent(self.extract_source(value)), - } - - self._send_request("POST", "/dump_code", data) + the_code = textwrap.dedent(self.extract_source(value)) - data = {"scope": key, "type": the_type} - - self._send_request("POST", "/dump_type", data) the_requirements = Upsonic_On_Prem.export_requirement() @@ -763,21 +755,11 @@ def set( if self.tester: self._log(f"the_original_requirements {the_original_requirements}") - data = { - "scope": key, - "requirements": the_original_requirements, - } - self._send_request("POST", "/dump_requirements", data) + the_version = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}" - data = { - "scope": key, - "python_version": f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}", - } - - self._send_request("POST", "/dump_python_version", data) fernet_key = base64.urlsafe_b64encode(hashlib.sha256(encryption_key.encode()).digest()) fernet = Fernet(fernet_key) @@ -828,11 +810,15 @@ def set( data = { "scope": key, + "code": the_code, + "type": the_type, + "requirements": the_original_requirements, + "python_version": the_version, "data": fernet.encrypt(dumped), "commit_message": message } - response = self._send_request("POST", "/dump", data) + response = self._send_request("POST", "/dump_together", data) if response != [None]: return True