BUG: /categories/recommended
This commit is contained in:
@@ -81,7 +81,7 @@ def get_highest_view_categories(no_categories: int = 4, offset: int = 0) -> Opti
|
||||
""", (no_categories, offset))
|
||||
return categories
|
||||
|
||||
def get_user_category_recommendations(user_id: int, no_categories: int = 4) -> Optional[List[dict]]:
|
||||
def get_user_category_recommendations(user_id: 1, no_categories: int = 4) -> Optional[List[dict]]:
|
||||
"""
|
||||
Queries user_preferences database to find users top favourite streaming category and returns the category
|
||||
"""
|
||||
@@ -90,8 +90,8 @@ def get_user_category_recommendations(user_id: int, no_categories: int = 4) -> O
|
||||
SELECT categories.category_id, categories.category_name
|
||||
FROM categories
|
||||
JOIN user_preferences ON categories.category_id = user_preferences.category_id
|
||||
WHERE user_id = ?
|
||||
ORDER BY favourability DESC
|
||||
WHERE user_preferences.user_id = ?
|
||||
ORDER BY user_preferences.favourability DESC
|
||||
LIMIT ?
|
||||
""", (user_id, no_categories))
|
||||
return categories
|
||||
Reference in New Issue
Block a user