Skip to content

Commit

Permalink
storage service edit
Browse files Browse the repository at this point in the history
  • Loading branch information
OrGur1987 committed Mar 30, 2023
1 parent 32b212c commit c2083d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/controllers/api/storage_services_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ def delete_resource_action(type, id = nil, _data = nil)
{:task_id => storage_service.delete_storage_service_queue(User.current_userid)}
end
end

def edit_resource(type, id, data = {})
api_resource(type, id, "Updating", :supports => :update) do |storage_service|
{:task_id => storage_service.update_storage_service_queue(User.current_userid, data)}
end
end
end
end
4 changes: 3 additions & 1 deletion config/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4221,7 +4221,7 @@
:identifier: storage_service
:options:
- :collection
:verbs: *gpd
:verbs: *gpppd
:klass: StorageService
:subcollections:
:collection_actions:
Expand All @@ -4231,6 +4231,8 @@
:post:
- :name: create
:identifier: storage_service_new
- :name: edit
:identifier: storage_service_edit
- :name: delete
:identifier: storage_service_delete
- :name: refresh
Expand Down

0 comments on commit c2083d1

Please sign in to comment.