Add vocal gender preference to customer request form and admin view
This commit is contained in:
parent
0f6b68cf5d
commit
5b6012aa3d
4 changed files with 32 additions and 8 deletions
|
|
@ -34,6 +34,7 @@ CREATE TABLE IF NOT EXISTS requests (
|
|||
suno_lyrics TEXT,
|
||||
song_a_path TEXT,
|
||||
song_b_path TEXT,
|
||||
vocal_gender TEXT,
|
||||
customer_approved TEXT DEFAULT 'none',
|
||||
approval_notified_at TIMESTAMP,
|
||||
preview_sent_at TIMESTAMP,
|
||||
|
|
@ -83,7 +84,7 @@ def now_utc():
|
|||
return datetime.now(timezone.utc).isoformat()
|
||||
|
||||
|
||||
def create_request(name, email, hobbies, notable_facts, style_genre, extra_requests):
|
||||
def create_request(name, email, hobbies, notable_facts, style_genre, extra_requests, vocal_gender=None):
|
||||
"""
|
||||
Insert a new customer request.
|
||||
Returns the auto-generated request id.
|
||||
|
|
@ -91,9 +92,9 @@ def create_request(name, email, hobbies, notable_facts, style_genre, extra_reque
|
|||
db = get_db()
|
||||
cur = db.execute(
|
||||
"""INSERT INTO requests
|
||||
(name, email, hobbies, notable_facts, style_genre, extra_requests, player_token)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)""",
|
||||
(name, email, hobbies, notable_facts, style_genre, extra_requests, new_token())
|
||||
(name, email, hobbies, notable_facts, style_genre, extra_requests, vocal_gender, player_token)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)""",
|
||||
(name, email, hobbies, notable_facts, style_genre, extra_requests, vocal_gender, new_token())
|
||||
)
|
||||
db.commit()
|
||||
return cur.lastrowid
|
||||
|
|
|
|||
Reference in a new issue