This commit is contained in:
syuilo
2017-01-17 10:39:21 +09:00
parent c4e517ab15
commit 19e12bf5cf
19 changed files with 28 additions and 29 deletions

View File

@ -55,7 +55,7 @@ export default async (req: express.Request, res: express.Response) => {
const secret = '!' + rndstr('a-zA-Z0-9', 32);
// Create account
const inserted = await User.insert({
const account = await User.insert({
token: secret,
avatar_id: null,
banner_id: null,
@ -77,8 +77,6 @@ export default async (req: express.Request, res: express.Response) => {
username_lower: username.toLowerCase()
});
const account = inserted.ops[0];
// Response
res.send(await serialize(account));