[API] Fix bugs
This commit is contained in:
parent
88e5a18509
commit
e31eec542f
5 changed files with 5 additions and 15 deletions
|
|
@ -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));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue