Module: Api::V1::Webhooks::Outgoing::Endpoints::ControllerBase
- Extended by:
- ActiveSupport::Concern
- Included in:
- Api::V1::Webhooks::Outgoing::EndpointsController
- Defined in:
- app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.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.
Instance Method Details
#create ⇒ Object
POST /api/v1/teams/:team_id/webhooks/outgoing/endpoints
45 46 47 48 49 50 51 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 45 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
63 64 65 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 63 def destroy @endpoint.destroy end |
#index ⇒ Object
GET /api/v1/teams/:team_id/webhooks/outgoing/endpoints
37 38 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 37 def index end |
#show ⇒ Object
GET /api/v1/webhooks/outgoing/endpoints/:id
41 42 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 41 def show end |
#update ⇒ Object
PATCH/PUT /api/v1/webhooks/outgoing/endpoints/:id
54 55 56 57 58 59 60 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 54 def update if @endpoint.update(endpoint_params) render :show else render json: @endpoint.errors, status: :unprocessable_entity end end |