[Git][noosfero/noosfero][master] refactoring tasks endpoint

Leandro Nunes gitlab at mg.gitlab.com
Wed Jul 20 12:31:31 BRT 2016


Leandro Nunes pushed to branch master at Noosfero / noosfero


Commits:
5c1cc1c2 by Leandro Nunes dos Santos at 2016-07-20T12:30:24-03:00
refactoring tasks endpoint

- - - - -


1 changed file:

- app/api/v1/tasks.rb


Changes:

=====================================
app/api/v1/tasks.rb
=====================================
--- a/app/api/v1/tasks.rb
+++ b/app/api/v1/tasks.rb
@@ -15,9 +15,7 @@ module Api
         # Example Request:
         #  GET host/api/v1/tasks?from=2013-04-04-14:41:43&until=2015-04-04-14:41:43&limit=10&private_token=e96fff37c2238fdab074d1dcea8e6317
         get do
-          tasks = select_filtered_collection_of(environment, 'tasks', params)
-          tasks = tasks.select {|t| current_person.has_permission?(t.permission, environment)}
-          present_partial tasks, :with => Entities::Task
+          present_tasks(environment)
         end
 
         desc "Return the task id"



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/5c1cc1c22686b33c47e8b4fe60788bb961f04f91
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160720/1dda0c10/attachment.html>


More information about the Noosfero-dev mailing list