[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

@@ -109,7 +109,7 @@ module.exports = async (params, user) =>
const secret = rndstr('a-zA-Z0-9', 32);
// Create account
const inserted = await App.insert({
const app = await App.insert({
created_at: new Date(),
user_id: user._id,
name: name,
@@ -121,8 +121,6 @@ module.exports = async (params, user) =>
secret: secret
});
const app = inserted.ops[0];
// Response
res(await serialize(app));
});