aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2011-03-10 21:54:04 +0100
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2011-03-10 21:54:04 +0100
commitba458eb2f645277040fe14c7812ca7be01732ee6 (patch)
tree75f1cc973a4f8463a0cddcc88c8f67eb985cfb6f /config
parenta7f48e45a54097f8ba24cf036fa10fbc5a576489 (diff)
downloadecs2-ba458eb2f645277040fe14c7812ca7be01732ee6.tar.gz
ecs2-ba458eb2f645277040fe14c7812ca7be01732ee6.zip
New subresource "receivers" added.
Now it's possible to ask for the addressed receivers of a posted message: curl .... -X GET https://server/<namespace>/<name>/<id>/receivers You will get back an array of receiver memberships, e.g. [ { "pid": 3, "itsyou": false, "cid": 2, "mid": 2 } ] pid: participant id cid: community id mid: membership id itsyou: true if the item belongs to you
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index c80984f..d26ab5b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -38,7 +38,8 @@ ActionController::Routing::Routes.draw do |map|
map.resources r.ressource.to_sym, :path_prefix => '/'+r.namespace,
:name_prefix => r.namespace+'_', :controller => 'messages',
:only => [:index, :show, :create, :update, :destroy],
- :collection => { :fifo => [:get, :post], :lifo => [:get, :post] }
+ :collection => { :fifo => [:get, :post], :lifo => [:get, :post] },
+ :member => { :receivers => :get }
end
rescue ActiveRecord::StatementInvalid
Rails.logger.info "DB error: #{$!}"