adding a consent requirement
This commit is contained in:
@@ -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):
|
||||
|
Reference in New Issue
Block a user