Class: Api::V2::PingsController
- Inherits:
-
ApiController
- Object
- ActionController::API
- ApiController
- Api::V2::PingsController
- Defined in:
- lib/stitches/generator_files/app/controllers/api/v2/pings_controller.rb
Instance Method Summary collapse
Methods inherited from ApiController
Methods included from Stitches::Deprecation
Instance Method Details
#create ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/stitches/generator_files/app/controllers/api/v2/pings_controller.rb', line 3 def create if ping_params[:error] render json: { errors: Stitches::Errors.new([ Stitches::Error.new(code: "test", message: ping_params[:error]) ])} , status: 422 else render json: { ping: { status_v2: "ok" } }, status: (ping_params[:status] || "201").to_i end end |