Created
April 8, 2016 15:30
-
-
Save babolivier/70b98435c933ef68ab6d625e7524f30f to your computer and use it in GitHub Desktop.
This file contains 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
var cozydb = require("cozydb"); | |
var data = cozydb.getModel('User', {}) | |
update = function(id) { | |
data.updateAttributes(id, { | |
otpKey: "7lmt5npm7p", | |
hotpCounter: 0, | |
authType: "hotp" | |
}, function(err) { | |
if(err) { console.log(err); } | |
else { console.log("Sent"); } | |
}); | |
} | |
data.request("all", function(err, results) { | |
if(err) { console.log(err); process.exit(); } | |
else { update(results[0]._id); } | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment