Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2016-06-22 20:15:09 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2016-07-01 15:52:04 +0300
commit3942621329b20307c1676d60324c8f47ea1e1b37 (patch)
tree45ec7ce2810878a7951946754cad10fad28642ab /lib/api/todos.rb
parentfd9cd5ae8cd2d2f5488635b264eb86d89d768d66 (diff)
Expose target, filter by state as string
Diffstat (limited to 'lib/api/todos.rb')
-rw-r--r--lib/api/todos.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/todos.rb b/lib/api/todos.rb
index 67714a796c7..8334baad1b9 100644
--- a/lib/api/todos.rb
+++ b/lib/api/todos.rb
@@ -18,7 +18,7 @@ module API
get do
todos = find_todos
- present paginate(todos), with: Entities::Todo
+ present paginate(todos), with: Entities::Todo, current_user: current_user
end
# Mark a todo as done
@@ -33,7 +33,7 @@ module API
todo = current_user.todos.find(params[:id])
todo.done
- present todo, with: Entities::Todo
+ present todo, with: Entities::Todo, current_user: current_user
end
# Mark all todos as done
@@ -45,7 +45,7 @@ module API
todos = find_todos
todos.each(&:done)
- present paginate(Kaminari.paginate_array(todos)), with: Entities::Todo
+ present paginate(Kaminari.paginate_array(todos)), with: Entities::Todo, current_user: current_user
end
end
end