aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/course.ml24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/course.ml b/src/course.ml
index fdabb50..0c93075 100644
--- a/src/course.ml
+++ b/src/course.ml
@@ -63,27 +63,27 @@ let date =
let encoding =
J.(conv
- (fun _ -> ("", default_date, default_date, false, "", (), (), (), (), ""),
- ([], None, (), (), (), (), ()))
- (fun ((_id, start, stop, _allDay, description, (), (), (), (), category),
- (_sites, _modules, (), (), (), (), ())) ->
+ (fun _ -> (default_date, default_date, "", "", (), (), ()),
+ ((), (), (), (), (), (), (), (), (), ()))
+ (fun ((start, stop, description, category, (), (), ()),
+ ((), (), (), (), (), (), (), (), (), ())) ->
let location, summary = location_and_summary description category in
Ics.Event.make start stop summary location)
(merge_objs
- (obj10
- (req "id" string)
+ (obj7
(req "start" date)
(req "end" date)
- (req "allDay" bool)
(req "description" string)
- (req "backgroundColor" unit)
+ (req "eventCategory" string)
+ (req "id" unit)
+ (req "allDay" unit)
+ (req "backgroundColor" unit))
+ (obj10
(req "textColor" unit)
(req "department" unit)
(req "faculty" unit)
- (req "eventCategory" string))
- (obj7
- (req "sites" @@ list string)
- (req "modules" @@ option (list string))
+ (req "sites" unit)
+ (req "modules" unit)
(req "registerStatus" unit)
(req "studentMark" unit)
(req "custom1" unit)