Allow posting announcements with other metadata

This commit is contained in:
Tusooa Zhu 2022-03-17 15:45:45 -04:00 committed by tusooa
commit 56e6d86f88
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
3 changed files with 40 additions and 4 deletions

View file

@ -1381,11 +1381,11 @@ const postAnnouncement = ({ credentials, content, startsAt, endsAt, allDay }) =>
const payload = { content }
if (typeof startsAt !== 'undefined') {
payload['starts_at'] = startsAt
payload['starts_at'] = new Date(startsAt).toISOString()
}
if (typeof endsAt !== 'undefined') {
payload['ends_at'] = endsAt
payload['ends_at'] = new Date(endsAt).toISOString()
}
if (typeof allDay !== 'undefined') {