Fixed issue #690 - API call /api/v1/online_notifications/{id} yields "no route".
This commit is contained in:
parent
a15f7abc00
commit
8c8f24f077
2 changed files with 28 additions and 0 deletions
|
@ -58,6 +58,33 @@ curl http://localhost/api/v1/online_notifications.json -v -u #{login}:#{password
|
||||||
|
|
||||||
=begin
|
=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:
|
Resource:
|
||||||
PUT /api/v1/online_notifications/{id}
|
PUT /api/v1/online_notifications/{id}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ Zammad::Application.routes.draw do
|
||||||
|
|
||||||
# groups
|
# groups
|
||||||
match api_path + '/online_notifications', to: 'online_notifications#index', via: :get
|
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#update', via: :put
|
||||||
match api_path + '/online_notifications/:id', to: 'online_notifications#destroy', via: :delete
|
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
|
match api_path + '/online_notifications/mark_all_as_read', to: 'online_notifications#mark_all_as_read', via: :post
|
||||||
|
|
Loading…
Reference in a new issue