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
|
create_action
|
||||||
respond_with_resource
|
respond_with_resource
|
||||||
end
|
end
|
||||||
|
|
||||||
def my_tokens
|
|
||||||
authorize resource_class
|
|
||||||
instantiate_collection
|
|
||||||
respond_with_collection
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -70,9 +70,7 @@ Metamaps::Application.routes.draw do
|
||||||
delete :stars, to: 'stars#destroy', on: :member
|
delete :stars, to: 'stars#destroy', on: :member
|
||||||
end
|
end
|
||||||
resources :synapses, only: [:index, :create, :show, :update, :destroy]
|
resources :synapses, only: [:index, :create, :show, :update, :destroy]
|
||||||
resources :tokens, only: [:create, :destroy] do
|
resources :tokens, only: [:index, :create, :destroy]
|
||||||
get :my_tokens, on: :collection
|
|
||||||
end
|
|
||||||
resources :topics, only: [:index, :create, :show, :update, :destroy]
|
resources :topics, only: [:index, :create, :show, :update, :destroy]
|
||||||
resources :users, only: [:index, :show] do
|
resources :users, only: [:index, :show] do
|
||||||
get :current, on: :collection
|
get :current, on: :collection
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
#type: collection
|
#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:
|
post:
|
||||||
body:
|
body:
|
||||||
application/json:
|
application/json:
|
||||||
|
@ -11,14 +20,6 @@ post:
|
||||||
body:
|
body:
|
||||||
application/json:
|
application/json:
|
||||||
example: !include ../examples/token.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}:
|
/{id}:
|
||||||
#type: item
|
#type: item
|
||||||
delete:
|
delete:
|
||||||
|
|
Loading…
Add table
Reference in a new issue