feature: update event store contents from existing code
This commit is contained in:
parent
985b580d7d
commit
e3917ee79a
|
@ -1,3 +1,6 @@
|
||||||
|
// TODO: this import should be removed once refactoring is finished
|
||||||
|
import { eventStore } from '../../frontend/stores'
|
||||||
|
|
||||||
const migrateRecord = (record) => {
|
const migrateRecord = (record) => {
|
||||||
// NOTE: v3 records
|
// NOTE: v3 records
|
||||||
const id = record.id || record.order
|
const id = record.id || record.order
|
||||||
|
@ -64,6 +67,8 @@ const saveRecord = ({ id, link, createdAt, startTime, title }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateStorage([ ...storageContents, record ])
|
updateStorage([ ...storageContents, record ])
|
||||||
|
|
||||||
|
eventStore.setCalculation({ id, link, createdAt, startTime, title })
|
||||||
}
|
}
|
||||||
|
|
||||||
const deleteRecord = (id) => {
|
const deleteRecord = (id) => {
|
||||||
|
|
Loading…
Reference in New Issue