Changeset View
Changeset View
Standalone View
Standalone View
lib/ops/report-store-ops.js
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | return { | ||||
payload: { | payload: { | ||||
id: operation.payload.report.id, | id: operation.payload.report.id, | ||||
report: JSON.stringify(operation.payload.report), | report: JSON.stringify(operation.payload.report), | ||||
}, | }, | ||||
}; | }; | ||||
}); | }); | ||||
} | } | ||||
function convertClientDBReportToClientReportCreationRequest( | |||||
reports: $ReadOnlyArray<ClientDBReport>, | |||||
): $ReadOnlyArray<ClientReportCreationRequest> { | |||||
return reports.map(reportRecord => JSON.parse(reportRecord.report)); | |||||
} | |||||
export { | export { | ||||
processReportStoreOperations, | processReportStoreOperations, | ||||
convertReportsToReplaceReportOps, | convertReportsToReplaceReportOps, | ||||
convertReportsToRemoveReportsOperation, | convertReportsToRemoveReportsOperation, | ||||
convertReportStoreOperationToClientDBReportStoreOperation, | convertReportStoreOperationToClientDBReportStoreOperation, | ||||
convertClientDBReportToClientReportCreationRequest, | |||||
}; | }; |