Skip to content

Commit

Permalink
make user_id assigned to current_user's id
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunado committed Dec 14, 2018
1 parent b7fe809 commit a799590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/graphql/mutations/start_contribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Mutations::StartContribution < GraphQL::Schema::Mutation

def resolve(task_id:)
task = Task.find(task_id)
contribution = Contribution.new(:user_id => 2, :task_id => task.id)
contribution = Contribution.new(:user_id => context[:current_user].id, :task_id => task.id)
if contribution.save && task.doing!
{ contribution: contribution, task: task, errors: [] }
else
Expand Down

0 comments on commit a799590

Please sign in to comment.