my_tokens endpoint moved to normal index
This commit is contained in:
parent
3051723bcf
commit
ed6682ba29
3 changed files with 10 additions and 17 deletions
|
@ -18,12 +18,6 @@ module Api
|
|||
create_action
|
||||
respond_with_resource
|
||||
end
|
||||
|
||||
def my_tokens
|
||||
authorize resource_class
|
||||
instantiate_collection
|
||||
respond_with_collection
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -70,9 +70,7 @@ Metamaps::Application.routes.draw do
|
|||
delete :stars, to: 'stars#destroy', on: :member
|
||||
end
|
||||
resources :synapses, only: [:index, :create, :show, :update, :destroy]
|
||||
resources :tokens, only: [:create, :destroy] do
|
||||
get :my_tokens, on: :collection
|
||||
end
|
||||
resources :tokens, only: [:index, :create, :destroy]
|
||||
resources :topics, only: [:index, :create, :show, :update, :destroy]
|
||||
resources :users, only: [:index, :show] do
|
||||
get :current, on: :collection
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
#type: collection
|
||||
get:
|
||||
description: |
|
||||
A list of the current user's tokens.
|
||||
is: [ searchable: { searchFields: description }, pageable, orderable ]
|
||||
responses:
|
||||
200:
|
||||
body:
|
||||
application/json:
|
||||
example: !include ../examples/tokens.json
|
||||
post:
|
||||
body:
|
||||
application/json:
|
||||
|
@ -11,14 +20,6 @@ post:
|
|||
body:
|
||||
application/json:
|
||||
example: !include ../examples/token.json
|
||||
/my_tokens:
|
||||
get:
|
||||
is: [ searchable: { searchFields: description }, pageable, orderable ]
|
||||
responses:
|
||||
200:
|
||||
body:
|
||||
application/json:
|
||||
example: !include ../examples/tokens.json
|
||||
/{id}:
|
||||
#type: item
|
||||
delete:
|
||||
|
|
Loading…
Add table
Reference in a new issue