fix(admin-service): admin config 端点也返回 agreementText
planting-service 调用的是 admin 控制器的 getConfig()(非 public 控制器), 因为 public 控制器有双重 api/v1 前缀。确保 admin getConfig 也包含协议文本。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5131728835
commit
7c95d1d425
|
|
@ -41,10 +41,12 @@ export class PrePlantingConfigController {
|
|||
) {}
|
||||
|
||||
@Get('config')
|
||||
@ApiOperation({ summary: '获取预种计划开关状态' })
|
||||
@ApiOperation({ summary: '获取预种计划开关状态(含协议文本)' })
|
||||
@ApiResponse({ status: HttpStatus.OK, description: '开关状态' })
|
||||
async getConfig() {
|
||||
return this.configService.getConfig();
|
||||
const config = await this.configService.getConfig();
|
||||
const agreementText = await this.configService.getAgreement();
|
||||
return { ...config, agreementText };
|
||||
}
|
||||
|
||||
@Post('config')
|
||||
|
|
|
|||
Loading…
Reference in New Issue