Last active
August 29, 2015 14:13
-
-
Save terakilobyte/4761b14db78e969bfbe9 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
User.find({'profile.picture': /twimg.*_normal/}, function(err, users, done) { | |
if (err) { debug('Username err: ', err); next(err); } | |
for (var i = 0; i < users.length; i++) { | |
console.log(users[i].profile.picture); | |
users[i].profile.picture = users[i].profile.picture.replace('_normal', ''); | |
users[i].save(function(err) { | |
if (err) { return next(err); } | |
done(err, user); | |
}); | |
console.log(users[i].profile.picture); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment