Class: Api::V1::Platform::AccessTokensController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Api::V1::Platform::AccessTokensController
- Includes:
- StrongParameters
- Defined in:
- app/controllers/api/v1/platform/access_tokens_controller.rb
Defined Under Namespace
Modules: StrongParameters
Instance Method Summary collapse
-
#create ⇒ Object
POST /api/v1/platform/applications/:application_id/access_tokens.
-
#destroy ⇒ Object
DELETE /api/v1/platform/access_tokens/:id.
-
#show ⇒ Object
GET /api/v1/platform/access_tokens/:id.
-
#update ⇒ Object
PATCH/PUT /api/v1/platform/access_tokens/:id.
Methods included from StrongParameters
Instance Method Details
#create ⇒ Object
POST /api/v1/platform/applications/:application_id/access_tokens
9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/api/v1/platform/access_tokens_controller.rb', line 9 def create @access_token.provisioned = true if @access_token.save render :show, status: :created, location: [:api, :v1, @access_token] else render json: @access_token.errors, status: :unprocessable_entity end end |
#destroy ⇒ Object
DELETE /api/v1/platform/access_tokens/:id
29 30 31 |
# File 'app/controllers/api/v1/platform/access_tokens_controller.rb', line 29 def destroy @access_token.destroy end |
#show ⇒ Object
GET /api/v1/platform/access_tokens/:id
5 6 |
# File 'app/controllers/api/v1/platform/access_tokens_controller.rb', line 5 def show end |
#update ⇒ Object
PATCH/PUT /api/v1/platform/access_tokens/:id
20 21 22 23 24 25 26 |
# File 'app/controllers/api/v1/platform/access_tokens_controller.rb', line 20 def update if @access_token.update(access_token_params) render :show else render json: @access_token.errors, status: :unprocessable_entity end end |