Fix announcements lint
This commit is contained in:
parent
d74d5a8ce2
commit
1fc0a8b332
2 changed files with 10 additions and 10 deletions
|
|
@ -1387,15 +1387,15 @@ const announcementToPayload = ({ content, startsAt, endsAt, allDay }) => {
|
|||
const payload = { content }
|
||||
|
||||
if (typeof startsAt !== 'undefined') {
|
||||
payload['starts_at'] = startsAt ? new Date(startsAt).toISOString() : null
|
||||
payload.starts_at = startsAt ? new Date(startsAt).toISOString() : null
|
||||
}
|
||||
|
||||
if (typeof endsAt !== 'undefined') {
|
||||
payload['ends_at'] = endsAt ? new Date(endsAt).toISOString() : null
|
||||
payload.ends_at = endsAt ? new Date(endsAt).toISOString() : null
|
||||
}
|
||||
|
||||
if (typeof allDay !== 'undefined') {
|
||||
payload['all_day'] = allDay
|
||||
payload.all_day = allDay
|
||||
}
|
||||
|
||||
return payload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue