Last active
January 25, 2016 01:03
-
-
Save bowbahdoe/a3ee9befb4750b77f02d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| update_asset = function(old_asset, updated_asset){ | |
| for (var property in old_asset) { | |
| if (old_asset.hasOwnProperty(property) { | |
| old_asset[property] = new_asset[property] | |
| } | |
| } | |
| old_asset.save(function(err){ | |
| //handle possible error | |
| }) | |
| } | |
| ... | |
| //then just use like | |
| update_asset(asset,req) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment