1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-10 21:24:20 +01:00

fix events endpoint

This commit is contained in:
Sylvain 2019-11-27 17:44:01 +01:00
parent 97d93cd622
commit 85d17d62f3
2 changed files with 1 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class API::ICalendarController < API::ApiController
cals = Icalendar::Calendar.parse(ics) cals = Icalendar::Calendar.parse(ics)
cals.first.events.each do |evt| cals.first.events.each do |evt|
@events.push(evt.merge!(color: i_cal.color)) @events.push(evt)
end end
end end
end end

View File

@ -6,5 +6,4 @@ json.array!(@events) do |event|
json.start event.dtstart.iso8601 json.start event.dtstart.iso8601
json.end event.dtend.iso8601 json.end event.dtend.iso8601
json.backgroundColor 'white' json.backgroundColor 'white'
json.borderColor event.color
end end