aboutsummaryrefslogtreecommitdiff
path: root/src/service
diff options
context:
space:
mode:
authorJoris2020-06-01 09:11:02 +0200
committerJoris2020-06-01 09:11:02 +0200
commit3844f76d18e376777ca4d7c124df6d6b4896a361 (patch)
tree425a2380f960f81f929b1b1b6e860bd42626127d /src/service
parentadfab777568215d3c72facf07b734c1ff6046d78 (diff)
Separate tasks panel on status
Diffstat (limited to 'src/service')
-rw-r--r--src/service/tasks.py9
1 files changed, 5 insertions, 4 deletions
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