Skip to content

Commit

Permalink
fix some typos from the provider end-points
Browse files Browse the repository at this point in the history
  • Loading branch information
Tansito committed Dec 26, 2024
1 parent d3b48cb commit 8a53989
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/qiskit_serverless/core/clients/serverless_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,11 @@ def provider_file_download(
)

def file_delete(self, file: str, function: QiskitFunction):
"""Deletes file uploaded or produced by the programs,"""
"""Deletes file uploaded or produced by the Qiskit function"""
return self._files_client.delete(file, function)

def provider_file_delete(self, file: str, function: QiskitFunction):
"""Deletes file uploaded or produced by the programs,"""
"""Deletes file uploaded or produced by the Qiskit Function"""
return self._files_client.provider_delete(file, function)

def file_upload(self, file: str, function: QiskitFunction):
Expand Down
2 changes: 1 addition & 1 deletion client/qiskit_serverless/core/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def provider_upload(self, file: str, function: QiskitFunction) -> Optional[str]:

with open(file, "rb") as f:
with requests.post(
os.path.join(self._files_url, "upload/"),
os.path.join(self._files_url, "provider", "upload/"),
files={"file": f},
params={"provider": function.provider, "function": function.title},
stream=True,
Expand Down
2 changes: 1 addition & 1 deletion gateway/api/views/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def provider_delete(self, request):
file_name = sanitize_file_name(request.query_params.get("file"))
provider_name = sanitize_name(request.query_params.get("provider"))
function_title = sanitize_name(request.query_params.get("function", None))
working_dir = WorkingDir.USER_STORAGE
working_dir = WorkingDir.PROVIDER_STORAGE

if not all([file_name, function_title, provider_name]):
return Response(
Expand Down
2 changes: 1 addition & 1 deletion gateway/tests/api/test_v1_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def test_provider_file_delete(self):
function = "Program"
file = "artifact_delete.tar"
username = "test_user_2"
functionPath = os.path.join(media_root, username, provider, function)
functionPath = os.path.join(media_root, provider, function)

if not os.path.exists(functionPath):
os.makedirs(functionPath)
Expand Down

0 comments on commit 8a53989

Please sign in to comment.