diff --git a/app/serializers/activity_serializer.rb b/app/serializers/activity_serializer.rb index c731f489f..a5f9fc02d 100644 --- a/app/serializers/activity_serializer.rb +++ b/app/serializers/activity_serializer.rb @@ -15,6 +15,7 @@ class ActivitySerializer attribute "prov:wasAttributedTo" do |object| return nil if object.username.blank? + 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