update APEventService with new metadata schema
This commit is contained in:
parent
b7c7e4d32d
commit
edd18f1b71
|
@ -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');
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
Loading…
Reference in New Issue