mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 23:36:44 -06:00
17 lines
358 B
JavaScript
17 lines
358 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);
|