From cb0240d34858619cb42e3b61a1da0a6bdaa5369e Mon Sep 17 00:00:00 2001 From: lesion Date: Tue, 21 Jun 2022 22:46:45 +0200 Subject: [PATCH] minor on account CLI --- server/cli/accounts.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/cli/accounts.js b/server/cli/accounts.js index a7b93304..fc32c942 100644 --- a/server/cli/accounts.js +++ b/server/cli/accounts.js @@ -28,13 +28,12 @@ async function modify (args) { async function create (args) { await _initializeDB() const User = require('../api/models/user') - console.error(args) const user = await User.create({ email: args.email, is_active: true, is_admin: args.admin || false - }) - console.error(user) + }).catch(e => console.error(String(e))) + console.error(JSON.stringify(user, null, 2)) await db.close() }