1
0
mirror of https://github.com/comatory/fb2iCal synced 2025-06-05 22:09:25 +02:00

fix: bring back persistence when fetching event data

This commit is contained in:
Ondřej Synáček
2020-12-20 14:46:30 +01:00
parent 514b2588df
commit df853d39af

View File

@ -1,5 +1,5 @@
import { postURL } from '../services'
import { parseStatusStore, requestStore } from '../stores'
import { eventStore, parseStatusStore, requestStore } from '../stores'
import { Request } from '../records'
import { uuidv4, parseStartTimeFromiCalString } from '../utils'
import { extractEventDataFromHTML } from '../../../lib/services/ics-retriever'
@ -53,8 +53,13 @@ const createICS = async (html, url, { logger }) => {
''
const startTime = parseStartTimeFromiCalString(startTimeMatch)
// TODO: save record to a store
// createRecord(uri, summary, startTime)
eventStore.setCalculation({
id: uuidv4(),
link: uri,
createdAt: new Date(),
startTime,
title: summary,
})
parseStatusStore.set(null)
} catch (err) {