adding a consent requirement

This commit is contained in:
Dan
2024-05-04 21:30:49 -04:00
parent 2f2f9ab568
commit c7791fc4aa
3 changed files with 65 additions and 8 deletions

View File

@@ -22,6 +22,12 @@ async def init_db():
priority TEXT,
FOREIGN KEY(project_id) REFERENCES projects(id))'''
)
await db.execute(
'''CREATE TABLE IF NOT EXISTS user_consents(
user_id INTEGER PRIMARY KEY,
consent_given BOOLEAN NOT NULL
)'''
)
await db.commit()
async def add_project(name, description):
@@ -47,7 +53,7 @@ async def add_task_to_project(project_id, description, assignee, deadline, statu
# Change the date format to MM/DD/YYYY
deadline_date = datetime.strptime(deadline, "%m/%d/%Y").date()
await db.execute("INSERT INTO tasks(project_id, description, assignee, deadline, status, priority) VALUES(?, ?, ?, ?, ?, ?)",
(project_id, description, assignee, deadline_date, status, priority))
(project_id, description, assignee, deadline_date, status, priority))
await db.commit()
async def update_task(task_id, description, assignee, deadline, status, priority):