Class: Dcm4chee::Api::V1::TrashedInstancesController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- Dcm4chee::ApplicationController
- BaseController
- Dcm4chee::Api::V1::TrashedInstancesController
- Defined in:
- app/controllers/dcm4chee/api/v1/trashed_instances_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Move a instance to the trash.
-
#destroy ⇒ Object
Delete an instance from the trash.
-
#index ⇒ Object
Search for instances from the trash.
Instance Method Details
#create ⇒ Object
Move a instance to the trash.
57 58 59 60 61 62 |
# File 'app/controllers/dcm4chee/api/v1/trashed_instances_controller.rb', line 57 def create instance = Instance.get!(params[:instance_id]) instance.move_to_trash head :created end |
#destroy ⇒ Object
Delete an instance from the trash.
73 74 75 76 77 78 |
# File 'app/controllers/dcm4chee/api/v1/trashed_instances_controller.rb', line 73 def destroy instance = TrashedInstance.get!(params[:id]) instance.remove_from_trash head :ok end |
#index ⇒ Object
Search for instances from the trash. Supported querying conditions:
trashed_series_id
Check DataMapper::Searcher::ClassMethods for supported querying operators.
39 40 41 42 43 |
# File 'app/controllers/dcm4chee/api/v1/trashed_instances_controller.rb', line 39 def index instances = TrashedInstance.search(params[:q]) respond_with trashed_instances: instances end |