25 lines
920 B
JavaScript
25 lines
920 B
JavaScript
import { BackendRuntimeContext as DependentBackendRuntimeContext } from 'oak-general-business/lib/context/BackendRuntimeContext';
|
|
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;
|