package cn.seecoder.paas.web.controller.api; import cn.seecoder.paas.service.ConfigService; import cn.seecoder.paas.service.model.vo.ConfigVO; import cn.seecoder.paas.util.ServiceException; import cn.seecoder.paas.web.model.Response; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/api/config") public class ConfigController { private final ConfigService configService; @Autowired public ConfigController(ConfigService configService) { this.configService = configService; } @PutMapping("") public Response update(@RequestBody ConfigVO configVO) throws ServiceException { return Response.buildSuccess(configService.createOrUpdate(configVO)); } }