aboutsummaryrefslogtreecommitdiff
path: root/src/service
diff options
context:
space:
mode:
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