Fixed issue #690 - API call /api/v1/online_notifications/{id} yields "no route".

This commit is contained in:
Rolf Schmidt 2017-04-13 10:15:26 +02:00
parent a15f7abc00
commit 8c8f24f077
2 changed files with 28 additions and 0 deletions

View file

@ -58,6 +58,33 @@ curl http://localhost/api/v1/online_notifications.json -v -u #{login}:#{password
=begin
Resource:
GET /api/v1/online_notifications/{id}
Payload:
{
"id": "123",
}
Response:
{
"id": 1,
"name": "some_name",
...
}
Test:
curl http://localhost/api/v1/online_notifications/#{id} -v -u #{login}:#{password}
=end
def show
return if !access?
model_show_render(OnlineNotification, params)
end
=begin
Resource:
PUT /api/v1/online_notifications/{id}

View file

@ -3,6 +3,7 @@ Zammad::Application.routes.draw do
# groups
match api_path + '/online_notifications', to: 'online_notifications#index', via: :get
match api_path + '/online_notifications/:id', to: 'online_notifications#show', via: :get
match api_path + '/online_notifications/:id', to: 'online_notifications#update', via: :put
match api_path + '/online_notifications/:id', to: 'online_notifications#destroy', via: :delete
match api_path + '/online_notifications/mark_all_as_read', to: 'online_notifications#mark_all_as_read', via: :post