Beispiel #1
0
 def execute(self):
     rtn = self._new_rtn()
     offset = self._get_int_parameter('offset', 1)
     limit = self._get_int_parameter('limit', 20)
     filters = self._get_str_parameter('filters')
     filters = jsonutil.to_dict(filters)
     pager = TaskService.get_instance().fetch_tasks(self._get_user_id(), filters=filters, limit=limit, offset=offset)            
     rtn.set_data(pager)
     return rtn.to_json()
Beispiel #2
0
 def execute(self):
     rtn = self._new_rtn()
     offset = self._get_int_parameter('offset', 1)
     limit = self._get_int_parameter('limit', 20)
     filters = self._get_str_parameter('filters')
     filters = jsonutil.to_dict(filters)
     pager = NoteService.get_instance().fetch_notes(self._get_user_id(), filters=filters, limit=limit, offset=offset)
     for note in pager.records:
         note.files = jsonutil.to_json(filex.fetch_files(self._get_user_id(), (Note.get_modelname(), note.key())))
     rtn.set_data(pager)
     return rtn.to_json()