mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-14 14:48:53 +09:00
15 lines
348 B
JavaScript
15 lines
348 B
JavaScript
const { default: User } = require('../../built/api/models/user');
|
|
const { generate } = require('../../built/crypto_key');
|
|
|
|
const updates = [];
|
|
|
|
User.find({}).each(function(user) {
|
|
updates.push(User.update({ _id: user._id }, {
|
|
$set: {
|
|
'account.keypair': generate(),
|
|
}
|
|
}));
|
|
}).then(function () {
|
|
Promise.all(updates)
|
|
}).then(process.exit);
|