fix: correct negotiate endpoint name

Was previously "negotiation/", but the API document described it as "negotiate/". It is now "negotiate/" in the implementation as well.

ref: N25B-168
This commit is contained in:
Twirre Meulenbelt
2025-10-16 15:02:01 +02:00
parent df985a8cbc
commit 308a19bff2

View File

@@ -27,7 +27,7 @@ class MainReceiver(ReceiverBase):
def _handle_port_negotiation(message): def _handle_port_negotiation(message):
endpoints = [socket.endpoint_description() for socket in state.sockets] endpoints = [socket.endpoint_description() for socket in state.sockets]
return {"endpoint": "negotiation/ports", "data": endpoints} return {"endpoint": "negotiate/ports", "data": endpoints}
@staticmethod @staticmethod
def _handle_negotiation(message): def _handle_negotiation(message):
@@ -42,10 +42,10 @@ class MainReceiver(ReceiverBase):
""" """
# In the future, the sender could send information like the robot's IP address, etc. # In the future, the sender could send information like the robot's IP address, etc.
if message["endpoint"] == "negotiation/ports": if message["endpoint"] == "negotiate/ports":
return MainReceiver._handle_port_negotiation(message) return MainReceiver._handle_port_negotiation(message)
return {"endpoint": "negotiation/error", "data": "The requested endpoint is not implemented."} return {"endpoint": "negotiate/error", "data": "The requested endpoint is not implemented."}
def handle_message(self, message): def handle_message(self, message):
if "endpoint" not in message: if "endpoint" not in message: