Class: Decidim::Comments::CommentMutationType

Inherits:
Api::Types::BaseObject show all
Defined in:
decidim-comments/lib/decidim/api/comment_mutation_type.rb

Instance Method Summary collapse

Methods inherited from Api::Types::BaseObject

allowed_to?, authorized?, determine_subject_name, local_context, permission_chain

Instance Method Details

#down_vote(args: {}) ⇒ Object



17
18
19
# File 'decidim-comments/lib/decidim/api/comment_mutation_type.rb', line 17

def down_vote(args: {})
  VoteCommentResolver.new(weight: -1).call(object, args, context)
end

#up_vote(args: {}) ⇒ Object



13
14
15
# File 'decidim-comments/lib/decidim/api/comment_mutation_type.rb', line 13

def up_vote(args: {})
  VoteCommentResolver.new(weight: 1).call(object, args, context)
end