[API] Fix bugs

This commit is contained in:
syuilo
2017-01-20 17:38:05 +09:00
parent 88e5a18509
commit e31eec542f
5 changed files with 5 additions and 15 deletions

View File

@ -66,14 +66,12 @@ module.exports = (params) =>
const token = uuid.v4();
// Create session token document
const inserted = await AuthSess.insert({
const doc = await AuthSess.insert({
created_at: new Date(),
app_id: app._id,
token: token
});
const doc = inserted.ops[0];
// Response
res({
token: doc.token,