debian-mirror-gitlab/app/controllers/concerns/todos_actions.rb

13 lines
283 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
module TodosActions
extend ActiveSupport::Concern
def create
todo = TodoService.new.mark_todo(issuable, current_user)
render json: {
count: TodosFinder.new(current_user, state: :pending).execute.count,
delete_path: dashboard_todo_path(todo)
}
end
end