| | |
| | | */ |
| | | @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 |
| | | @PostMapping("/project-introduction-password") |
| | | public ApiResponse<Void> savePasswordConfig(@Valid @RequestBody ProjectIntroductionPasswordRequest req) { |
| | | passwordService.savePasswordConfig(req); |
| | | return ApiResponse.ok(null); |
| | |
| | | */ |
| | | export async function getProjectIntroductionPassword() { |
| | | return request<API.Response<ProjectIntroductionPasswordConfig>>( |
| | | '/api/admin/live/project-introduction-password', |
| | | '/project-introduction-password', |
| | | { |
| | | method: 'GET', |
| | | }, |
| | |
| | | * 保存项目介绍密码配置 |
| | | */ |
| | | export async function saveProjectIntroductionPassword(data: ProjectIntroductionPasswordConfig) { |
| | | return request<API.Response<void>>('/api/admin/live/project-introduction-password', { |
| | | return request<API.Response<void>>('/project-introduction-password', { |
| | | method: 'POST', |
| | | data, |
| | | }); |