diff --git a/app/graphql/mutations/projects/update_project.rb b/app/graphql/mutations/projects/update_project.rb index ad09224..a1c8b0a 100644 --- a/app/graphql/mutations/projects/update_project.rb +++ b/app/graphql/mutations/projects/update_project.rb @@ -9,9 +9,7 @@ class UpdateProject < BaseMutation field :project, Types::ProjectType, null: false field :errors, [String], null: false - - authorize :update, Project - + def resolve(id:, name: nil, description: nil) project = authorized_find!(id) project.name = name if name @@ -38,4 +36,4 @@ def authorized_find!(id) project end end - end \ No newline at end of file + end