package com.yc.wms.controller;

import com.yc.wms.model.MQTTResult;
import lombok.extern.slf4j.Slf4j;


import com.yc.wms.model.User;
import com.yc.wms.until.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wms
 * @since 2023-07-07
 */
@Slf4j
@RestController
@RequestMapping("/menu")
public class MenuController {

    @PostMapping("/login")
    public ResponseEntity<Object> login(@RequestBody User user) {
        System.out.println(""+user.username+"/"+user.password);
        log.error(""+user.username+"/"+user.password);
        //{
        //    "result": "allow" | "deny" | "ignore", // Default `"ignore"`
        //    "is_superuser": true | false // Default `false`
        //}
        MQTTResult mqttResult=new MQTTResult();
        return new ResponseEntity(mqttResult, HttpStatus.OK);
    }

}
