oak-pay-business/es/context/BackendRuntimeContext.js

25 lines
884 B
JavaScript

import { BackendRuntimeContext as DependentBackendRuntimeContext } from './DependentContext';
import { mergedProjection } from '../utils/application';
export class BackendRuntimeContext extends DependentBackendRuntimeContext {
applicationProjection = mergedProjection;
async toString() {
const data = await this.getSerializedData();
return JSON.stringify(data);
}
async refineOpRecords() {
await super.refineOpRecords();
for (const opRecord of this.opRecords) {
if (opRecord.a === 's') {
const { d } = opRecord;
for (const entity in d) {
if (['application', 'system'].includes(entity)) {
// todo 删除掉config中的敏感返回信息
}
}
}
}
}
}
;
export default BackendRuntimeContext;