From 3844f76d18e376777ca4d7c124df6d6b4896a361 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 1 Jun 2020 09:11:02 +0200 Subject: Separate tasks panel on status --- src/service/tasks.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/service') diff --git a/src/service/tasks.py b/src/service/tasks.py index 870002a..0dfe94f 100644 --- a/src/service/tasks.py +++ b/src/service/tasks.py @@ -1,15 +1,16 @@ from typing import List from model.task import Task, ValidTaskForm +from model.status import Status import db.tasks import db.task_tags import database -def get(cursor) -> List[Task]: - return db.tasks.get(cursor) +def get(cursor, status: Status) -> List[Task]: + return db.tasks.get(cursor, status) -def create(cursor, task_form: ValidTaskForm) -> Task: - task = db.tasks.insert(cursor, task_form) +def create(cursor, status: Status, task_form: ValidTaskForm) -> Task: + task = db.tasks.insert(cursor, status, task_form) db.task_tags.insert_many(cursor, task.id, task_form.tags) database.commit() return task -- cgit v1.2.3