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
44 45 46 47 48 49 50 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 44 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
62 63 64 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 62 def destroy @endpoint.destroy end |
#index ⇒ Object
GET /api/v1/teams/:team_id/webhooks/outgoing/endpoints
36 37 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 36 def index end |
#show ⇒ Object
GET /api/v1/webhooks/outgoing/endpoints/:id
40 41 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 40 def show end |
#update ⇒ Object
PATCH/PUT /api/v1/webhooks/outgoing/endpoints/:id
53 54 55 56 57 58 59 |
# File 'app/controllers/concerns/api/v1/webhooks/outgoing/endpoints/controller_base.rb', line 53 def update if @endpoint.update(endpoint_params) render :show else render json: @endpoint.errors, status: :unprocessable_entity end end |