2018-09-14 01:42:05 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-07-16 09:35:19 -04:00
|
|
|
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
|