Class: Api::V1::Webhooks::Outgoing::EndpointsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Api::V1::Webhooks::Outgoing::EndpointsController
- Includes:
- StrongParameters
- Defined in:
- app/controllers/api/v1/webhooks/outgoing/endpoints_controller.rb
Defined Under Namespace
Modules: StrongParameters
Instance Method Summary collapse
-
#create ⇒ Object
POST /api/v1/teams/:team_id/webhooks/outgoing/endpoints.
-
#destroy ⇒ Object
DELETE /api/v1/webhooks/outgoing/endpoints/:id.
-
#index ⇒ Object
GET /api/v1/teams/:team_id/webhooks/outgoing/endpoints.
-
#show ⇒ Object
GET /api/v1/webhooks/outgoing/endpoints/:id.
-
#update ⇒ Object
PATCH/PUT /api/v1/webhooks/outgoing/endpoints/:id.
Methods included from StrongParameters
Instance Method Details
#create ⇒ Object
POST /api/v1/teams/:team_id/webhooks/outgoing/endpoints
15 16 17 18 19 20 21 |
# File 'app/controllers/api/v1/webhooks/outgoing/endpoints_controller.rb', line 15 def create if @endpoint.save render :show, status: :created, location: [:api, :v1, @endpoint] else render json: @endpoint.errors, status: :unprocessable_entity end end |
#destroy ⇒ Object
DELETE /api/v1/webhooks/outgoing/endpoints/:id
33 34 35 |
# File 'app/controllers/api/v1/webhooks/outgoing/endpoints_controller.rb', line 33 def destroy @endpoint.destroy end |
#index ⇒ Object
GET /api/v1/teams/:team_id/webhooks/outgoing/endpoints
7 8 |
# File 'app/controllers/api/v1/webhooks/outgoing/endpoints_controller.rb', line 7 def index end |
#show ⇒ Object
GET /api/v1/webhooks/outgoing/endpoints/:id
11 12 |
# File 'app/controllers/api/v1/webhooks/outgoing/endpoints_controller.rb', line 11 def show end |
#update ⇒ Object
PATCH/PUT /api/v1/webhooks/outgoing/endpoints/:id
24 25 26 27 28 29 30 |
# File 'app/controllers/api/v1/webhooks/outgoing/endpoints_controller.rb', line 24 def update if @endpoint.update(endpoint_params) render :show else render json: @endpoint.errors, status: :unprocessable_entity end end |