fixes attachment download path in api

Kudos to @oliverguenter for the fix
pull/3434/head
Jens Ulferts 9 years ago
parent 27f05acbc7
commit db3681661d
  1. 6
      doc/apiv3-documentation.apib
  2. 2
      lib/api/v3/utilities/path_helper.rb
  3. 2
      spec/lib/api/v3/utilities/path_helper_spec.rb

@ -751,7 +751,7 @@ container (e.g. a work package or a board message).
"href": "/api/v3/users/1"
},
"downloadLocation": {
"href": "/attachments/1"
"href": "/attachments/1/download"
}
},
"id": 1,
@ -875,7 +875,7 @@ Permanently deletes the specified attachment.
"href": "/api/v3/users/1"
},
"downloadLocation": {
"href": "/attachments/1"
"href": "/attachments/1/download"
}
},
"id": 1,
@ -906,7 +906,7 @@ Permanently deletes the specified attachment.
"href": "/api/v3/users/1"
},
"downloadLocation": {
"href": "/attachments/2"
"href": "/attachments/2/download"
}
},
"id": 2,

@ -49,7 +49,7 @@ module API
end
def self.attachment_download(id)
attachment_path(id)
download_attachment_path(id)
end
def self.attachments_by_work_package(id)

@ -69,7 +69,7 @@ describe ::API::V3::Utilities::PathHelper do
describe '#attachment_download' do
subject { helper.attachment_download 1 }
it_behaves_like 'path', '/attachments/1'
it_behaves_like 'path', '/attachments/1/download'
end
describe '#attachments_by_work_package' do

Loading…
Cancel
Save