From 7ae392ad76532513ccb3393c07636a413b28edb2 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Wed, 15 Feb 2023 14:34:09 -0500 Subject: [PATCH] fix flex dir, follower/folowing swap fix --- public/css/profile.css | 4 ++++ src/database/friends.rs | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/css/profile.css b/public/css/profile.css index 54bf4f1..b9e1d3d 100644 --- a/public/css/profile.css +++ b/public/css/profile.css @@ -124,6 +124,10 @@ body { align-self: center; padding: 0; display: flex; + flex-direction: column; +} + +#about { flex-direction: row; } diff --git a/src/database/friends.rs b/src/database/friends.rs index 7e23616..f592675 100644 --- a/src/database/friends.rs +++ b/src/database/friends.rs @@ -84,8 +84,8 @@ impl Database { WHERE EXISTS ( SELECT NULL FROM friends f - WHERE f.follower_id = ? - AND u.user_id = f.followee_id + WHERE u.user_id = f.follower_id + AND f.followee_id = ? ) ", )?; @@ -106,8 +106,8 @@ impl Database { WHERE EXISTS ( SELECT NULL FROM friends f - WHERE u.user_id = f.follower_id - AND f.followee_id = ? + WHERE f.follower_id = ? + AND u.user_id = f.followee_id ) ", )?;