Fix cli role name attr

This commit is contained in:
rijkvanzanten
2021-05-10 12:53:43 -04:00
parent 44ffd60174
commit 891fe01093
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
import { getSchema } from '../../../utils/get-schema';
export default async function rolesCreate({ name, admin }: { name: string; admin: boolean }): Promise<void> {
export default async function rolesCreate({ role: name, admin }: { role: string; admin: boolean }): Promise<void> {
const { default: database } = require('../../../database/index');
const { RolesService } = require('../../../services/roles');

View File

@@ -55,7 +55,7 @@ const rolesCommand = program.command('roles');
rolesCommand
.command('create')
.description('Create a new role')
.option('--name <value>', `name for the role`)
.option('--role <value>', `name for the role`)
.option('--admin', `whether or not the role has admin access`)
.action(rolesCreate);