|
|
@@ -266,18 +266,3 @@ def remove_duplicates(db, user_id, username): # Remove duplicate usernames
|
|
|
db.commit()
|
|
|
except Error as rderror:
|
|
|
current_app.logger.error(f'Couldn\'t remove duplicate username {username} for {user_id}: {rderror.args[0]}')
|
|
|
-
|
|
|
-
|
|
|
-def mark_followed(db, user_id): # Mark a user as a follower by entering the date in the followed column
|
|
|
- try:
|
|
|
- follow_date = time.localtime()
|
|
|
- follow_date = time.strftime("%m/%d/%Y", follow_date)
|
|
|
- db.execute(
|
|
|
- "UPDATE points SET followed = ? WHERE id = ?",
|
|
|
- (follow_date, user_id)
|
|
|
- )
|
|
|
- db.commit()
|
|
|
- return True
|
|
|
- except Error as mferror:
|
|
|
- current_app.logger.error(f'Couldn\'t mark {user_id} as followed in the points database: {mferror.args[0]}')
|
|
|
- return False
|