Merge remote-tracking branch 'refs/remotes/origin/master' into domain
This commit is contained in:
commit
affaf07d3f
@ -58,6 +58,7 @@ export type IUser = {
|
|||||||
pinned_post_id: mongo.ObjectID;
|
pinned_post_id: mongo.ObjectID;
|
||||||
is_suspended: boolean;
|
is_suspended: boolean;
|
||||||
keywords: string[];
|
keywords: string[];
|
||||||
|
host: string;
|
||||||
account: {
|
account: {
|
||||||
keypair: string;
|
keypair: string;
|
||||||
email: string;
|
email: string;
|
||||||
|
@ -119,6 +119,7 @@ export default async (req: express.Request, res: express.Response) => {
|
|||||||
drive_capacity: 1073741824, // 1GB
|
drive_capacity: 1073741824, // 1GB
|
||||||
username: username,
|
username: username,
|
||||||
username_lower: username.toLowerCase(),
|
username_lower: username.toLowerCase(),
|
||||||
|
host: null,
|
||||||
account: {
|
account: {
|
||||||
keypair: generateKeypair(),
|
keypair: generateKeypair(),
|
||||||
token: secret,
|
token: secret,
|
||||||
|
@ -6,9 +6,7 @@ const updates = [];
|
|||||||
User.find({}).each(function(user) {
|
User.find({}).each(function(user) {
|
||||||
updates.push(User.update({ _id: user._id }, {
|
updates.push(User.update({ _id: user._id }, {
|
||||||
$set: {
|
$set: {
|
||||||
account: {
|
'account.keypair': generate(),
|
||||||
keypair: generate(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
|
1
tools/migration/shell.1522116709.user-host.js
Normal file
1
tools/migration/shell.1522116709.user-host.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
db.users.update({ }, { $set: { host: null } }, { multi: true });
|
Loading…
Reference in New Issue
Block a user