Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/snippets/update.rb')
-rw-r--r--app/graphql/mutations/snippets/update.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/graphql/mutations/snippets/update.rb b/app/graphql/mutations/snippets/update.rb
index 27c232bc7f8..b6bdcb9b67b 100644
--- a/app/graphql/mutations/snippets/update.rb
+++ b/app/graphql/mutations/snippets/update.rb
@@ -33,13 +33,13 @@ module Mutations
def resolve(args)
snippet = authorized_find!(id: args.delete(:id))
- result = UpdateSnippetService.new(snippet.project,
+ result = ::Snippets::UpdateService.new(snippet.project,
context[:current_user],
- snippet,
- args).execute
+ args).execute(snippet)
+ snippet = result.payload[:snippet]
{
- snippet: result ? snippet : snippet.reset,
+ snippet: result.success? ? snippet : snippet.reset,
errors: errors_on_object(snippet)
}
end