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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user