Fix things
This commit is contained in:
@@ -45,7 +45,6 @@ message_controller = MessageController(app, auth_data, "https://192.168.15.120:8
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
|
||||
forwarder = MQTTForwarder(client_id, local_broker, api_broker)
|
||||
forwarder.start(f"/customer/telemetry/#", f"/board-mate/{client_id}/telemetry")
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class AuthController:
|
||||
def auth(self):
|
||||
try:
|
||||
received_data = request.get_json()
|
||||
print(received_data)
|
||||
with ApiClient(self.config) as client:
|
||||
auth_api = AuthApi(client)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class MessageController:
|
||||
msg = req["message"]
|
||||
payload = json.dumps({"content" : msg})
|
||||
print(payload)
|
||||
self._mqtt_service.publish(f"/chat/${self.auth_data.get_client_id()}/message", payload)
|
||||
self._mqtt_service.publish(f"/chat/${self._auth_data.get_client_id()}/message", payload)
|
||||
return jsonify({"success" : True, "message": "An error occurred"}), 500
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
@@ -11,7 +11,6 @@ import be.naaturel.boardmateapi.controllers.dtos.WebexWebhook;
|
||||
import be.naaturel.boardmateapi.services.MessageService;
|
||||
import be.naaturel.boardmateapi.services.MqttService;
|
||||
import be.naaturel.boardmateapi.services.WebexService;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
Reference in New Issue
Block a user