diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-27 12:23:51 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-27 12:23:51 +0900 |
| commit | affaf07d3fb90dbe4b6fbfa1aa8c17f3cb8c4f46 (patch) | |
| tree | 59fc32601e2a768f4cbda87b7068c5f10010ac65 | |
| parent | Merge branch 'master' of https://github.com/syuilo/misskey (diff) | |
| parent | Merge pull request #1311 from akihikodaki/key (diff) | |
| download | misskey-affaf07d3fb90dbe4b6fbfa1aa8c17f3cb8c4f46.tar.gz misskey-affaf07d3fb90dbe4b6fbfa1aa8c17f3cb8c4f46.tar.bz2 misskey-affaf07d3fb90dbe4b6fbfa1aa8c17f3cb8c4f46.zip | |
Merge remote-tracking branch 'refs/remotes/origin/master' into domain
| -rw-r--r-- | src/api/models/user.ts | 1 | ||||
| -rw-r--r-- | src/api/private/signup.ts | 1 | ||||
| -rw-r--r-- | tools/migration/node.1522066477.user-account-keypair.js | 4 | ||||
| -rw-r--r-- | tools/migration/shell.1522116709.user-host.js | 1 |
4 files changed, 4 insertions, 3 deletions
diff --git a/src/api/models/user.ts b/src/api/models/user.ts index d3875a65b9..08d7fbb8c7 100644 --- a/src/api/models/user.ts +++ b/src/api/models/user.ts @@ -58,6 +58,7 @@ export type IUser = { pinned_post_id: mongo.ObjectID; is_suspended: boolean; keywords: string[]; + host: string; account: { keypair: string; email: string; diff --git a/src/api/private/signup.ts b/src/api/private/signup.ts index 690f3001cc..a4c06b5f5e 100644 --- a/src/api/private/signup.ts +++ b/src/api/private/signup.ts @@ -119,6 +119,7 @@ export default async (req: express.Request, res: express.Response) => { drive_capacity: 1073741824, // 1GB username: username, username_lower: username.toLowerCase(), + host: null, account: { keypair: generateKeypair(), token: secret, diff --git a/tools/migration/node.1522066477.user-account-keypair.js b/tools/migration/node.1522066477.user-account-keypair.js index 4a968aae28..effea137c6 100644 --- a/tools/migration/node.1522066477.user-account-keypair.js +++ b/tools/migration/node.1522066477.user-account-keypair.js @@ -6,9 +6,7 @@ const updates = []; User.find({}).each(function(user) { updates.push(User.update({ _id: user._id }, { $set: { - account: { - keypair: generate(), - } + 'account.keypair': generate(), } })); }).then(function () { diff --git a/tools/migration/shell.1522116709.user-host.js b/tools/migration/shell.1522116709.user-host.js new file mode 100644 index 0000000000..b354709a61 --- /dev/null +++ b/tools/migration/shell.1522116709.user-host.js @@ -0,0 +1 @@ +db.users.update({ }, { $set: { host: null } }, { multi: true }); |