Skip to content

Commit

Permalink
add thirdparty/sameeboy handling
Browse files Browse the repository at this point in the history
  • Loading branch information
avivace committed May 28, 2024
1 parent aae5aca commit 7257fcd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hhub/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def entries_all(request):
)
return JsonResponse(serializer.data, safe=False)


def search_entries(request):
"""
Returns every entry matching the conditions given in the query
Expand All @@ -93,6 +94,7 @@ def search_entries(request):
platform = request.GET.get("platform", "")
text_query = request.GET.get("q", "")
random_query = request.GET.get("random", False)
thirdparty = request.GET.get("thirdparty", "")

# Pagination
# Request a specific page
Expand All @@ -113,6 +115,11 @@ def search_entries(request):
# elif num_elements >= 30:
# num_elements = 30

# TODO: Implement filtering on the new schema field for distribution terms
# to third parties. For now, make sameboy return empty
if thirdparty == "sameboy":
entries = []

# sort and order
if sort_by_param:
entries = sort_and_order(entries, order_by_param, sort_by_param)
Expand Down

0 comments on commit 7257fcd

Please sign in to comment.