Skip to content

Commit

Permalink
express doi in activities api as url
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 8, 2019
1 parent 5ecbe1f commit 25dd33d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/serializers/activity_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ class ActivitySerializer
belongs_to :doi, record_type: :dois

attribute "prov:wasDerivedFrom" do |object|
object.uid
url = Rails.env.production? ? "https://api.datacite.org" : "https://api.test.datacite.org"
url + "/dois" + object.uid
end

attribute "prov:wasAttributedTo" do |object|
Expand Down

0 comments on commit 25dd33d

Please sign in to comment.