diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-25 20:44:37 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-25 20:44:37 +0000 |
commit | 03062394fcad0d9e12bec5e97b3129406157694e (patch) | |
tree | 3f1e13b7b1ae4a97ca3d999b53b80e4710624990 /app/views/wiki/show.api.rsb | |
parent | eff874b29a908e85e80d8bcd6a20fd85165e59cd (diff) | |
download | redmine-03062394fcad0d9e12bec5e97b3129406157694e.tar.gz redmine-03062394fcad0d9e12bec5e97b3129406157694e.zip |
Adds ?include=attachments option when retrieving a wiki page with the REST API (#7082).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10718 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/wiki/show.api.rsb')
-rw-r--r-- | app/views/wiki/show.api.rsb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/wiki/show.api.rsb b/app/views/wiki/show.api.rsb index acf62bb94..2f0690187 100644 --- a/app/views/wiki/show.api.rsb +++ b/app/views/wiki/show.api.rsb @@ -8,4 +8,10 @@ api.wiki_page do api.author(:id => @content.author_id, :name => @content.author.name) api.created_on @page.created_on api.updated_on @content.updated_on + + api.array :attachments do + @page.attachments.each do |attachment| + render_api_attachment(attachment, api) + end + end if include_in_api_response?('attachments') end |