Skip to content

Commit

Permalink
dont show user with no pfp
Browse files Browse the repository at this point in the history
  • Loading branch information
Thombrix committed May 3, 2024
1 parent fa6a019 commit 745306e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/kodecupidapp/views/swipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def random_user(self,request):
# exclude users that do not have the sex of the user that is looking for
users = users.exclude(sex=not cu_user.looking_for)
users = users.exclude(id__in=likes_source_user)
users = users.exclude(pfp=None)


if len(users) == 0:
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/clients/apiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ApiClient {
try {
const reponse =await axios.post(handleRoute(RouteEnum.LIKE_LIST), {target_user_id: id});
if (reponse.status === 201 && reponse.data?.match) {
// setError({message: 'Vous avez un match !!!'}, 'success');
setError({message: 'Vous avez un match !!!'}, 'success');
}
return true;
} catch (error) {
Expand Down

0 comments on commit 745306e

Please sign in to comment.