mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
do not show title if calendar is configured to hide them
This commit is contained in:
parent
85d17d62f3
commit
f72ae98109
@ -38,7 +38,7 @@ class API::ICalendarController < API::ApiController
|
||||
cals = Icalendar::Calendar.parse(ics)
|
||||
|
||||
cals.first.events.each do |evt|
|
||||
@events.push(evt)
|
||||
@events.push(calendar: i_cal, event: evt)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,9 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
json.array!(@events) do |event|
|
||||
json.id event.uid
|
||||
json.title event.summary
|
||||
json.start event.dtstart.iso8601
|
||||
json.end event.dtend.iso8601
|
||||
json.id event[:event].uid
|
||||
json.title event[:calendar].text_hidden ? '' : event[:event].summary
|
||||
json.start event[:event].dtstart.iso8601
|
||||
json.end event[:event].dtend.iso8601
|
||||
json.backgroundColor 'white'
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user