优化
This commit is contained in:
@@ -328,6 +328,10 @@ export async function run(context) {
|
||||
const path = `${basePath}?accountId=${encodeURIComponent(container.tenantId)}`
|
||||
const body = { feeItemId: Number(feeItems.PAYABLE.id), direction: 'PAYABLE', businessDate: dateOffset(-2), amount: 300, currency: 'CNY', settlementIncluded: true, remark: `${context.marker}-CONTAINER_SHARED` }
|
||||
const response = await request(context, 'POST', path, body)
|
||||
if (response?.http === 404) {
|
||||
blocker(context, '按柜费用来源接口已部署并可路由',
|
||||
`POST ${path} returned HTTP 404 before Controller handling; Firstleg Controller contract is /api/platform/v1/loading-plans/{loadingPlanId}/fee-details, but current Gateway route does not expose /api/platform/v1/loading-plans/**; requestId=${response.requestId || 'missing'}, traceId=${response.traceId || 'missing'}`)
|
||||
}
|
||||
const detail = context.apiSuccess(MODULE, '创建按柜费用来源', response, '', OPTIONS)
|
||||
const feeId = id(detail?.id)
|
||||
if (feeId) { const approval = await request(context, 'POST', `${basePath}/${feeId}/approve?accountId=${encodeURIComponent(container.tenantId)}`); context.apiSuccess(MODULE, '审核按柜费用来源', approval, '', OPTIONS) }
|
||||
|
||||
Reference in New Issue
Block a user