From 891fe0109300ea5d7b70fd4851ebce6b166aef43 Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Mon, 10 May 2021 12:53:43 -0400 Subject: [PATCH] Fix cli role name attr --- api/src/cli/commands/roles/create.ts | 2 +- api/src/cli/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/cli/commands/roles/create.ts b/api/src/cli/commands/roles/create.ts index 27b46ac8c4..910b2d860f 100644 --- a/api/src/cli/commands/roles/create.ts +++ b/api/src/cli/commands/roles/create.ts @@ -1,6 +1,6 @@ import { getSchema } from '../../../utils/get-schema'; -export default async function rolesCreate({ name, admin }: { name: string; admin: boolean }): Promise { +export default async function rolesCreate({ role: name, admin }: { role: string; admin: boolean }): Promise { const { default: database } = require('../../../database/index'); const { RolesService } = require('../../../services/roles'); diff --git a/api/src/cli/index.ts b/api/src/cli/index.ts index 3443a17ed2..462f611376 100644 --- a/api/src/cli/index.ts +++ b/api/src/cli/index.ts @@ -55,7 +55,7 @@ const rolesCommand = program.command('roles'); rolesCommand .command('create') .description('Create a new role') - .option('--name ', `name for the role`) + .option('--role ', `name for the role`) .option('--admin', `whether or not the role has admin access`) .action(rolesCreate);