You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@bp.route("/search", methods=["POST"])@bp.arguments(SearchDatasetSchema(partial=True))@bp.response(200, DatasetSchema(many=True))@bp.sort()@bp.paginate()@jwt_required()defsearch_datasets(
query: SearchDatasetSchema, pagination_parameters: PaginationParameters, sort_parameters: SortParameters
):
"""List datasets the user has access to matching the query."""username=get_jwt_identity()
try:
datasets=search_datasets_by_user(username, query, sort_parameters)
# better delegate sorting to DB here ...exceptAuthenticationError:
abort(401)
# ... or apply sorting post-query here pagination_parameters.item_count=len(datasets)
returnjsonify(
datasets[pagination_parameters.first_item : pagination_parameters.last_item+1]
)
This will make it easier to find datasets of interest.
It is likely that the natural place this functionality will be somewhere just below the header.
The text was updated successfully, but these errors were encountered: