Skip to content

Commit d35a64d

Browse files
committed
CL-16 Make sure not to send JSON body with processing request
1 parent f494a53 commit d35a64d

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/maptiler/cloud_cli/base.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -157,26 +157,26 @@ def ingest(self, ingest_id: UUID) -> IngestResponse:
157157
def process_ingest(
158158
self, ingest_id: UUID, upload_result: Optional[S3UploadResult]
159159
) -> IngestResponse:
160+
url = urljoin(self.base_url, f"/v1/tiles/ingest/{ingest_id}/process")
160161
if upload_result is None:
161-
json = None
162+
response = self.session.post(url)
162163
else:
163-
json = {
164-
"upload_result": {
165-
"type": "s3_multipart",
166-
"parts": [
167-
{
168-
"part_id": item.part_id,
169-
"etag": item.etag,
170-
}
171-
for item in upload_result.parts
172-
],
173-
}
174-
}
164+
response = self.session.post(
165+
url,
166+
json={
167+
"upload_result": {
168+
"type": "s3_multipart",
169+
"parts": [
170+
{
171+
"part_id": item.part_id,
172+
"etag": item.etag,
173+
}
174+
for item in upload_result.parts
175+
],
176+
}
177+
},
178+
)
175179

176-
response = self.session.post(
177-
urljoin(self.base_url, f"/v1/tiles/ingest/{ingest_id}/process"),
178-
json=json,
179-
)
180180
self.check(response)
181181
return self.ingest_response(response.json())
182182

0 commit comments

Comments
 (0)