summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/boards/create.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/boards/create.rb')
-rw-r--r--app/graphql/mutations/boards/create.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/graphql/mutations/boards/create.rb b/app/graphql/mutations/boards/create.rb
index 92bce557446..003c4f7761b 100644
--- a/app/graphql/mutations/boards/create.rb
+++ b/app/graphql/mutations/boards/create.rb
@@ -14,7 +14,7 @@ module Mutations
null: true,
description: 'The board after mutation.'
- authorize :admin_board
+ authorize :admin_issue_board
def resolve(args)
board_parent = authorized_resource_parent_find!(args)
@@ -22,7 +22,7 @@ module Mutations
response = ::Boards::CreateService.new(board_parent, current_user, args).execute
{
- board: response.payload,
+ board: response.success? ? response.payload : nil,
errors: response.errors
}
end