diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-16 11:38:09 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-16 11:38:09 +0900 |
| commit | 9427a756c9e4a1d95210ccfca56fdb67d62183ec (patch) | |
| tree | 667cf5f4d6ecf80d0e3a22c4085a410537d1dc9d /src/models/auth-session.ts | |
| parent | fix(package): update @types/node to version 10.12.0 (#2912) (diff) | |
| download | misskey-9427a756c9e4a1d95210ccfca56fdb67d62183ec.tar.gz misskey-9427a756c9e4a1d95210ccfca56fdb67d62183ec.tar.bz2 misskey-9427a756c9e4a1d95210ccfca56fdb67d62183ec.zip | |
Update mongodb
Diffstat (limited to 'src/models/auth-session.ts')
| -rw-r--r-- | src/models/auth-session.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/models/auth-session.ts b/src/models/auth-session.ts index 3d2c9ee3c1..3458d5675f 100644 --- a/src/models/auth-session.ts +++ b/src/models/auth-session.ts @@ -1,6 +1,7 @@ import * as mongo from 'mongodb'; const deepcopy = require('deepcopy'); import db from '../db/mongodb'; +import isObjectId from '../misc/is-objectid'; import { pack as packApp } from './app'; const AuthSession = db.get<IAuthSession>('authSessions'); @@ -31,7 +32,7 @@ export const pack = ( _session = deepcopy(session); // Me - if (me && !mongo.ObjectID.prototype.isPrototypeOf(me)) { + if (me && !isObjectId(me)) { if (typeof me === 'string') { me = new mongo.ObjectID(me); } else { |