aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Gruin2020-09-11 23:46:23 +0200
committerAlban Gruin2020-09-11 23:46:23 +0200
commitd11f5875b52e86fd28b3f1de805d5af4d108d8e5 (patch)
tree585ed0ee6d30f15aae3a4f0d2dc3ee4379b6bd59
parent3dc6cc287227bdfc218e79ea4753b601689eff2a (diff)
course: stop parsing unused fields
Signed-off-by: Alban Gruin <alban at pa1ch dot fr>
-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)