update APEventService with new metadata schema

This commit is contained in:
ssmucny 2023-05-23 21:51:41 -04:00
parent b7c7e4d32d
commit edd18f1b71
2 changed files with 11 additions and 1 deletions

View File

@ -50,7 +50,16 @@ export class ApEventService {
title, title,
start, start,
end, end,
metadata: {}, metadata: {
'@context': 'https://schema.org',
'@type': 'Event',
name: note.name,
url: note.href,
startDate: note.startTime.toISOString(),
endDate: note.endTime?.toISOString(),
description: note.summary,
identifier: note.id,
},
}; };
} else { } else {
throw new Error('Invalid event properties'); throw new Error('Invalid event properties');

View File

@ -109,6 +109,7 @@ export type EventSchema = {
sameAs?: string; // ie. URL to website/social sameAs?: string; // ie. URL to website/social
}[]; }[];
typicalAgeRange?: string; typicalAgeRange?: string;
identifier?: string;
} }
export type IEvent = { export type IEvent = {