From ee1138b39b9709871adcb97b915d5944cd2091c9 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 12 Nov 2025 15:07:59 -0500 Subject: Remove manual approval requirement for new accounts New accounts now default to 'active' status instead of 'pending'. Users can start using the service immediately after signup. --- Biz/PodcastItLater/Core.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'Biz/PodcastItLater/Core.py') diff --git a/Biz/PodcastItLater/Core.py b/Biz/PodcastItLater/Core.py index 42b336e..da1726c 100644 --- a/Biz/PodcastItLater/Core.py +++ b/Biz/PodcastItLater/Core.py @@ -545,15 +545,9 @@ class Database: # noqa: PLR0904 users_columns = [col[1] for col in users_info] if "status" not in users_columns: - # Add status column with default 'pending' + # Add status column with default 'active' cursor.execute( - "ALTER TABLE users ADD COLUMN status TEXT " - "DEFAULT 'pending'", - ) - - # Set all existing users to 'active' - cursor.execute( - "UPDATE users SET status = 'active' WHERE status IS NULL", + "ALTER TABLE users ADD COLUMN status TEXT DEFAULT 'active'", ) conn.commit() @@ -629,12 +623,12 @@ class Database: # noqa: PLR0904 ) @staticmethod - def create_user(email: str, status: str = "pending") -> tuple[int, str]: + def create_user(email: str, status: str = "active") -> tuple[int, str]: """Create a new user and return (user_id, token). Args: email: User email address - status: Initial status (pending, active, or disabled) + status: Initial status (active or disabled) Raises: ValueError: If user ID cannot be retrieved after insert or if user -- cgit v1.2.3