fix(mining-admin): configValue → value,修复配置读取后 fallback 到默认值
Prisma 返回的字段是 value,controller 写成了 configValue, 导致 getP2pTransferFee / getTransferEnabled 永远返回默认值 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b50091eb1e
commit
a31fcaa9b8
|
|
@ -28,7 +28,7 @@ export class ConfigController {
|
|||
@ApiOperation({ summary: '获取划转开关状态' })
|
||||
async getTransferEnabled() {
|
||||
const config = await this.configService.getConfig('system', 'transfer_enabled');
|
||||
return { enabled: config?.configValue === 'true' };
|
||||
return { enabled: config?.value === 'true' };
|
||||
}
|
||||
|
||||
@Post('transfer-enabled')
|
||||
|
|
@ -198,8 +198,8 @@ export class ConfigController {
|
|||
this.configService.getConfig('trading', 'min_p2p_transfer_amount'),
|
||||
]);
|
||||
return {
|
||||
fee: feeConfig?.configValue ?? '5',
|
||||
minTransferAmount: minAmountConfig?.configValue ?? '6',
|
||||
fee: feeConfig?.value ?? '5',
|
||||
minTransferAmount: minAmountConfig?.value ?? '6',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -242,8 +242,8 @@ export class ConfigController {
|
|||
this.configService.getConfig('trading', 'min_p2p_transfer_amount'),
|
||||
]);
|
||||
return {
|
||||
fee: feeConfig?.configValue ?? '5',
|
||||
minTransferAmount: minAmountConfig?.configValue ?? '6',
|
||||
fee: feeConfig?.value ?? '5',
|
||||
minTransferAmount: minAmountConfig?.value ?? '6',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue