admin/app/controllers/workarea/api/admin/releases_controller.rb in workarea-api-4.4.7 vs admin/app/controllers/workarea/api/admin/releases_controller.rb in workarea-api-4.5.0

- old
+ new

@@ -34,10 +34,15 @@ key :type, :string key :enum, %w(asc desc) key :default, 'desc' end + parameter :updated_at_starts_at + parameter :updated_at_ends_at + parameter :created_at_starts_at + parameter :created_at_ends_at + response 200 do key :description, 'Releases' schema do key :type, :object property :releases do @@ -95,9 +100,11 @@ end def index @releases = Release .all + .by_updated_at(starts_at: params[:updated_at_starts_at], ends_at: params[:updated_at_ends_at]) + .by_created_at(starts_at: params[:created_at_starts_at], ends_at: params[:created_at_ends_at]) .order_by(sort_field => sort_direction) .page(params[:page]) respond_with releases: @releases end