Changed the List function to use project name instead of project id
This commit is contained in:
@@ -36,6 +36,12 @@ async def get_project_id(name):
|
||||
result = await cursor.fetchone()
|
||||
return result[0] if result else None
|
||||
|
||||
async def get_project_name(project_id):
|
||||
async with aiosqlite.connect(DATABASE) as db:
|
||||
cursor = await db.execute("SELECT name FROM projects WHERE id = ?", (project_id,))
|
||||
result = await cursor.fetchone()
|
||||
return result[0] if result else None
|
||||
|
||||
async def add_task_to_project(project_id, description, assignee, deadline, status, priority):
|
||||
async with aiosqlite.connect(DATABASE) as db:
|
||||
# Change the date format to MM/DD/YYYY
|
||||
|
Reference in New Issue
Block a user