diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2011-03-18 12:21:04 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2011-03-18 12:31:40 +0100 |
commit | c818bcf94687e005fe7dfc6e4f5efe3760046aae (patch) | |
tree | 39a7067598f64891d57d144fc16a8ef8b1f41890 /config | |
parent | ee4c537774ebfe743806fe54a86dd6cba27c151a (diff) | |
download | ecs2-c818bcf94687e005fe7dfc6e4f5efe3760046aae.tar.gz ecs2-c818bcf94687e005fe7dfc6e4f5efe3760046aae.zip |
New member subresource "details" added.
Now it's possible to ask for detailed (meta) information of a posted
message. Only the original sender can do that:
curl .... -X GET https://server/<namespace>/<name>/<id>/details
You will get back something like this:
{
"receivers": [
{
"itsyou": true,
"mid": 1,
"cid": 2
},
{
"itsyou": false,
"mid": 2,
"cid": 2
}
],
"senders": [
1,
1
],
"content_type": "application/json"
}
The "receivers" and "senders" have corresponding arrays: The first array
entry in "senders" has been addressed the first array entry of
"receivers" and so on.
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb index d26ab5b..770ac67 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -39,7 +39,7 @@ ActionController::Routing::Routes.draw do |map| :name_prefix => r.namespace+'_', :controller => 'messages', :only => [:index, :show, :create, :update, :destroy], :collection => { :fifo => [:get, :post], :lifo => [:get, :post] }, - :member => { :receivers => :get } + :member => { :receivers => :get, :details => :get } end rescue ActiveRecord::StatementInvalid Rails.logger.info "DB error: #{$!}" |