def get(self, raw_query): args = search_parser.parse_args() page = page_parser.parse_args().get('page') raw_types = args.get('types') or 'event,story,concept' types = raw_types.split(',') if raw_query: results, total_count = search(raw_query, page, PER_PAGE, types=types) return results, total_count return not_found()
def get(self): page = page_parser.parse_args().get('page') results = models.User.query.paginate(page, per_page=PER_PAGE).items count = models.User.query.count() return results, count or not_found()