dataease-dm/backend/src/main/java/io/dataease/controller/AboutController.java
2021-05-18 12:23:21 +08:00

33 lines
879 B
Java

package io.dataease.controller;
import io.dataease.commons.license.F2CLicenseResponse;
import io.dataease.service.AboutService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Map;
@RequestMapping("/about")
@RestController
public class AboutController {
@Resource
private AboutService aboutService;
@PostMapping("/license/update")
public F2CLicenseResponse updateLicense(@RequestBody Map<String, String> map) {
return aboutService.updateLicense(map.get("license"));
}
@PostMapping("/license/validate")
public F2CLicenseResponse validateLicense(@RequestBody Map<String, String> map) {
return aboutService.validateLicense(map.get("license"));
}
@GetMapping("/build/version")
public Object getBuildVersion() {
return aboutService.getBuildVersion();
}
}