We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf67ea7 commit dc51ef2Copy full SHA for dc51ef2
backend/data/follows.py
@@ -21,6 +21,14 @@ def follow(follower: User, followee: User):
21
pass
22
23
24
+def unfollow(follower: User, followee: User):
25
+ """Remove a follow relationship between two users."""
26
+ with db_cursor() as cur:
27
+ cur.execute(
28
+ "DELETE FROM follows WHERE follower = %s AND followee = %s",
29
+ (follower.id, followee.id),
30
+ )
31
+
32
def get_followed_usernames(follower: User) -> List[str]:
33
"""get_followed_usernames returns a list of usernames followee follows."""
34
with db_cursor() as cur:
0 commit comments