minor on account CLI

This commit is contained in:
lesion 2022-06-21 22:46:45 +02:00
parent 660b866f2f
commit cb0240d348
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -28,13 +28,12 @@ async function modify (args) {
async function create (args) { async function create (args) {
await _initializeDB() await _initializeDB()
const User = require('../api/models/user') const User = require('../api/models/user')
console.error(args)
const user = await User.create({ const user = await User.create({
email: args.email, email: args.email,
is_active: true, is_active: true,
is_admin: args.admin || false is_admin: args.admin || false
}) }).catch(e => console.error(String(e)))
console.error(user) console.error(JSON.stringify(user, null, 2))
await db.close() await db.close()
} }