| | |
| | | */ |
| | | @Validated |
| | | @RestController |
| | | @RequestMapping("/api/admin/live/project-introduction-password") |
| | | @RequestMapping({"/api/v1", "/api"}) |
| | | public class ProjectIntroductionPasswordController { |
| | | |
| | | private final ProjectIntroductionPasswordService passwordService; |
| | |
| | | /** |
| | | * 获取项目介绍密码配置 |
| | | */ |
| | | @GetMapping |
| | | @GetMapping("/project-introduction-password") |
| | | public ApiResponse<ProjectIntroductionPasswordVO> getPasswordConfig() { |
| | | return ApiResponse.ok(passwordService.getPasswordConfig()); |
| | | } |
| | |
| | | /** |
| | | * 保存项目介绍密码配置 |
| | | */ |
| | | @PostMapping |
| | | public ApiResponse<Void> savePasswordConfig(@Valid @RequestBody ProjectIntroductionPasswordRequest req) { |
| | | @PostMapping("/project-introduction-password") |
| | | public ApiResponse<Boolean> savePasswordConfig(@Valid @RequestBody ProjectIntroductionPasswordRequest req) { |
| | | passwordService.savePasswordConfig(req); |
| | | return ApiResponse.ok(null); |
| | | return ApiResponse.ok(true); |
| | | } |
| | | } |