Skip to content

Commit 5551a52

Browse files
committed
add body to all delete endpoints
1 parent 1cf57c2 commit 5551a52

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/apps/measurements.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def patch(self, url, body, headers, query_params):
5151
def delete(self, url, body, headers, query_params):
5252
response = requests.delete(f"{self.host}{url}"
5353
f"{get_query_params(query_params)}",
54+
json=body,
5455
headers=headers)
5556
logging.info(f"MEASUREMENTS | DELETE | {url}")
57+
logging.debug(f"BODY: {body}")
5658
return make_response(self.getResponseJson(response),
5759
response.status_code)

src/apps/plants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def patch(self, url, body, headers, query_params):
5151
def delete(self, url, body, headers, query_params):
5252
response = requests.delete(f"{self.host}{url}"
5353
f"{get_query_params(query_params)}",
54+
json=body,
5455
headers=headers)
5556
logging.info(f"PLANTS | DELETE | {url}")
57+
logging.debug(f"BODY: {body}")
5658
return make_response(self.getResponseJson(response),
5759
response.status_code)

src/apps/users.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ def delete(self, url, body, headers, query_params):
113113
return make_response(token_error_response,
114114
token_error_response.get("status"))
115115
url = f"{self.host}{url}{get_query_params(query_params)}"
116-
response = requests.delete(url, headers=headers)
116+
response = requests.delete(url, json=body, headers=headers)
117117
logging.info(f"USERS | DELETE | {url}")
118+
logging.debug(f"BODY: {body}")
118119
headers = dict(response.headers)
119120
response = make_response(self.getResponseJson(response),
120121
response.status_code)

0 commit comments

Comments
 (0)