Class: Dcm4chee::Api::V1::TrashedSeriesController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- Dcm4chee::ApplicationController
- BaseController
- Dcm4chee::Api::V1::TrashedSeriesController
- Defined in:
- app/controllers/dcm4chee/api/v1/trashed_series_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Move a series to the trash including the related instances and files.
-
#destroy ⇒ Object
Delete a series from the trash.
-
#index ⇒ Object
Search for series from the trash.
Instance Method Details
#create ⇒ Object
Move a series to the trash including the related instances and files.
56 57 58 59 60 61 |
# File 'app/controllers/dcm4chee/api/v1/trashed_series_controller.rb', line 56 def create series = Series.get!(params[:series_id]) series.move_to_trash head :created end |
#destroy ⇒ Object
Delete a series from the trash.
72 73 74 75 76 77 |
# File 'app/controllers/dcm4chee/api/v1/trashed_series_controller.rb', line 72 def destroy series = TrashedSeries.get!(params[:id]) series.remove_from_trash head :ok end |
#index ⇒ Object
Search for series from the trash. Supported querying conditions:
trashed_study_id
Check DataMapper::Searcher::ClassMethods for supported querying operators.
37 38 39 40 41 |
# File 'app/controllers/dcm4chee/api/v1/trashed_series_controller.rb', line 37 def index series = TrashedSeries.search(params[:q]) respond_with trashed_series: series end |