Skip to content

Commit

Permalink
username in activities as url
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Mar 10, 2019
1 parent f1bb1b7 commit 0c86d89
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 @@ -13,7 +13,8 @@ class ActivitySerializer
end

attribute "prov:wasAttributedTo" do |object|
object.username
url = Rails.env.production? ? "https://api.datacite.org" : "https://api.test.datacite.org"
object.username.include?(".") ? url + "/clients" + object.username : url + "/providers/" + object.username
end

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

0 comments on commit 0c86d89

Please sign in to comment.