lib/osso/graphql/mutations/regenerate_oauth_credentials.rb in osso-0.0.3.12 vs lib/osso/graphql/mutations/regenerate_oauth_credentials.rb in osso-0.0.3.13
- old
+ new
@@ -12,12 +12,12 @@
field :errors, [String], null: false
def resolve(id:)
oauth_client = Osso::Models::OauthClient.find(id)
oauth_client.generate_secrets
-
+
return response_data(oauth_client: oauth_client) if oauth_client.save
-
+
response_error(errors: oauth_client.errors.full_messages)
end
def ready?(*)
return true if context[:scope] == :admin