Fix typo, herp.

This commit is contained in:
Jonathan Cremin 2015-09-02 20:53:25 +02:00
parent c6f0b16e5c
commit d10dc9113b

View file

@ -16,7 +16,7 @@ export default function* (next) {
const userToken = yield this.redis.get(this.req.headers.authorization.substr(1));
this.assert(userToken, 401, '{"error": {"message": "Invalid token.", "code": 606}}');
debug('Token found');
user = yield Users.findOne({'_id': this.db.objectID(userToken)});
user = yield Users.findOne({'_id': this.db.objectId(userToken)});
} else {
const authUser = auth(this);
this.assert(authUser, 401, badLoginMsg);