Skip to content

Instantly share code, notes, and snippets.

@babolivier
Created May 29, 2016 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save babolivier/4926dccbb687e0aa76c5a4c792479f11 to your computer and use it in GitHub Desktop.
Save babolivier/4926dccbb687e0aa76c5a4c792479f11 to your computer and use it in GitHub Desktop.
var cozydb = require("cozydb");
var data = cozydb.getModel('User', {
authType: String
})
update = function(id) {
data.updateAttributes(id, {
authType: null
}, function(err) {
if(err) { console.log(err); }
else { console.log("Sent"); }
});
}
data.request("all", function(err, results) {
if(err) { console.log(err); process.exit(); }
update(results[0]._id);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment