Skip to content

Commit

Permalink
Cleaned up rio-loader (#301)
Browse files Browse the repository at this point in the history
* Cleaned up rio-loader

* Renamed string constants

* Renamed constants after rebase
  • Loading branch information
mdemare authored May 15, 2024
1 parent c58d6c0 commit b8a50c3
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 163 deletions.
2 changes: 1 addition & 1 deletion src/nl/surf/eduhub_rio_mapper/commands/link.clj
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
(case type
"education-specification" ["aanleveren_opleidingseenheid" "eigenOpleidingseenheidSleutel"]
("course" "program") ["aanleveren_aangebodenOpleiding" "eigenAangebodenOpleidingSleutel"])
rio-obj (rio.loader/rio-finder getter rio-config request)]
rio-obj (rio.loader/rio-finder getter request)]
(if (nil? rio-obj)
(throw (ex-info "404 Not Found" {:phase :resolving}))
(let [rio-obj (xmlclj->duo-hiccup rio-obj)
Expand Down
4 changes: 2 additions & 2 deletions src/nl/surf/eduhub_rio_mapper/commands/processing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@
output (if (nil? ooapi-summary) diff (assoc diff :opleidingseenheidcode rio-code))]
(merge output (dry-run-status rio-summary ooapi-summary))))

(defn- course-program-dry-run-handler [ooapi-entity {::ooapi/keys [id] :keys [institution-oin] :as request} {:keys [rio-config ooapi-loader]}]
(let [rio-obj (rio.loader/find-aangebodenopleiding id institution-oin rio-config)
(defn- course-program-dry-run-handler [ooapi-entity {::ooapi/keys [id] :keys [institution-oin] :as request} {:keys [getter ooapi-loader]}]
(let [rio-obj (rio.loader/find-aangebodenopleiding id getter institution-oin)
rio-summary (dry-run/summarize-aangebodenopleiding-xml rio-obj)
offering-summary (->> (ooapi.loader/load-offerings ooapi-loader request)
(map dry-run/summarize-offering)
Expand Down
Loading

0 comments on commit b8a50c3

Please sign in to comment.