lib/hippo/api/handlers/asset.rb in hippo-fw-0.9.4 vs lib/hippo/api/handlers/asset.rb in hippo-fw-0.9.5
- old
+ new
@@ -1,8 +1,17 @@
module Hippo::API::Handlers
class Asset
+ def self.deleter
+ lambda do
+ asset = ::Hippo::Asset.find(params['id'])
+ asset.destroy
+ json_reply std_api_reply(:destroy, asset, {})
+ end
+ end
+
+
def self.saver
lambda do
model = params['owner_type'].underscore.camelize.constantize
authentication = Hippo::API::AuthenticationProvider.new(request)