diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-04-10 15:04:27 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-04-10 15:04:27 +0900 |
| commit | 626cfb61ac3940bee7a3acf1b1c5c4cae4ae410c (patch) | |
| tree | 23b89c000b1b169c36cffc7a345a2fc1ebe33347 /src/server/index.ts | |
| parent | Delete get-user-summary.ts (diff) | |
| download | misskey-626cfb61ac3940bee7a3acf1b1c5c4cae4ae410c.tar.gz misskey-626cfb61ac3940bee7a3acf1b1c5c4cae4ae410c.tar.bz2 misskey-626cfb61ac3940bee7a3acf1b1c5c4cae4ae410c.zip | |
テーブル分割
Diffstat (limited to 'src/server/index.ts')
| -rw-r--r-- | src/server/index.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index 563117773e..9c153f0167 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -23,7 +23,7 @@ import apiServer from './api'; import { sum } from '../prelude/array'; import Logger from '../services/logger'; import { program } from '../argv'; -import { Users } from '../models'; +import { UserProfiles } from '../models'; import { networkChart } from '../services/chart'; export const serverLogger = new Logger('server', 'gray', false); @@ -73,15 +73,15 @@ router.use(nodeinfo.routes()); router.use(wellKnown.routes()); router.get('/verify-email/:code', async ctx => { - const user = await Users.findOne({ + const profile = await UserProfiles.findOne({ emailVerifyCode: ctx.params.code }); - if (user != null) { + if (profile != null) { ctx.body = 'Verify succeeded!'; ctx.status = 200; - Users.update(user.id, { + UserProfiles.update({ userId: profile.userId }, { emailVerified: true, emailVerifyCode: null }); |