forked from GitHubMirrors/silverbullet-icalendar
Add URL trimming and fetching logs
Some checks failed
Build SilverBullet Plug / build (push) Failing after 10s
Some checks failed
Build SilverBullet Plug / build (push) Failing after 10s
This commit is contained in:
@@ -154,7 +154,9 @@ async function getSources(): Promise<Source[]> {
|
||||
* Fetches and parses events from a single calendar source
|
||||
*/
|
||||
async function fetchAndParseCalendar(source: Source): Promise<CalendarEvent[]> {
|
||||
const response = await fetch(source.url);
|
||||
const url = source.url.trim();
|
||||
console.log(`[iCalendar] Fetching: ${url}`);
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
const error = new Error(`HTTP ${response.status}: ${response.statusText}`);
|
||||
|
||||
Reference in New Issue
Block a user