Allow posting announcements with other metadata
This commit is contained in:
parent
db5c0c3502
commit
56e6d86f88
3 changed files with 40 additions and 4 deletions
|
|
@ -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') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue