Skip to content

Commit

Permalink
Renamed other-names events to match the :event/action-entity-type str…
Browse files Browse the repository at this point in the history
…ucture #304
  • Loading branch information
mluypaert committed Sep 24, 2020
1 parent 650a87a commit 6802260
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions resources/schema/seed-data.edn
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
#:db{:ident :event/new-gene}
#:db{:ident :event/new-unnamed-gene}
#:db{:ident :event/update-gene}
#:db{:ident :event/add-gene-other-names}
#:db{:ident :event/retract-gene-other-names}
#:db{:ident :event/add-other-names-gene}
#:db{:ident :event/retract-other-names-gene}
#:db{:ident :event/merge-genes}
#:db{:ident :event/undo-merge-genes}
#:db{:ident :event/split-gene}
Expand Down
4 changes: 2 additions & 2 deletions src/wormbase/names/batch/gene.clj
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
:handler (fn [request]
(wnbg/adjust-attr-vals :gene/id
:gene/other-names
:event/add-gene-other-names
:event/add-other-names-gene
::wsg/update-other-names-batch
wnu/conform-data
true
Expand All @@ -140,7 +140,7 @@
:handler (fn [request]
(wnbg/adjust-attr-vals :gene/id
:gene/other-names
:event/retract-gene-other-names
:event/retract-other-names-gene
::wsg/update-other-names-batch
wnu/conform-data
false
Expand Down
4 changes: 2 additions & 2 deletions src/wormbase/names/gene.clj
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
(assoc bad-request {:schema ::wsv/error-response})
(wnu/response-map))
:handler (fn [request]
(let [add-other-names (wne/update-multi-card identify :gene/id :event/add-gene-other-names :db/add ':gene/other-names)]
(let [add-other-names (wne/update-multi-card identify :gene/id :event/add-other-names-gene :db/add ':gene/other-names)]
(add-other-names request identifier)))}
:delete
{:summary "Delete a set of other-names from a gene."
Expand All @@ -527,7 +527,7 @@
(assoc bad-request {:schema ::wsv/error-response})
(wnu/response-map))
:handler (fn [request]
(let [delete-other-names (wne/update-multi-card identify :gene/id :event/retract-gene-other-names :db/retract ':gene/other-names)]
(let [delete-other-names (wne/update-multi-card identify :gene/id :event/retract-other-names-gene :db/retract ':gene/other-names)]
(delete-other-names request identifier)))}}))
(sweet/context "/merge/:from-identifier" [from-identifier]
(sweet/resource
Expand Down

0 comments on commit 6802260

Please sign in to comment.