Fix api.coffee media deletion implementation