package com.fuyuanshen.global.mqtt.publish;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/")
@Slf4j
public class DeviceDataController {

    @Autowired
    private MqttClientTest mqttClientTest;
    
//    @PostMapping("/{deviceId}/command")
    public ResponseEntity<String> sendCommand() {

        mqttClientTest.sendMsg();
        return ResponseEntity.ok("success");
    }
}