Skip to content

Commit aa20c3d

Browse files
Juliana MashonJuliana Mashon
Juliana Mashon
authored and
Juliana Mashon
committed
Added new add_info() function with
1 parent 017cda2 commit aa20c3d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

functions/information.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ def edit_info(self, endpoint, new_data, id=None):
4242

4343
return endpoint_data
4444

45-
def add_info(self, endpoint, new_data, id=None):
45+
def add_info(self, endpoint, new_data):
4646
"""Create new informated contained within an endpoint."""
4747

48-
self.auth.request("POST", endpoint, database_id=id, payload=new_data)
48+
self.auth.request("POST", endpoint, database_id=None, payload=new_data)
4949

50-
endpoint_data = self.get_info(endpoint, id)
50+
endpoint_data = self.get_info(endpoint, id=None)
5151

5252
self.broker.state.print_status("add_info()", endpoint_json=endpoint_data)
5353

main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ def edit_info(self, endpoint, new_data, id=None):
110110
"""Change information contained within an endpoint."""
111111
return self.info.edit_info(endpoint, new_data, id)
112112

113-
def add_info(self, endpoint, new_data, id=None):
113+
def add_info(self, endpoint, new_data):
114114
"""Create new informated contained within an endpoint."""
115-
return self.info.add_info(endpoint, new_data, id)
115+
return self.info.add_info(endpoint, new_data)
116116

117117
def safe_z(self):
118118
"""Returns the highest safe point along the z-axis."""

0 commit comments

Comments
 (0)