graphql_python_template/app/usecases/todo/delete_todo.py
2020-10-30 16:07:06 +01:00

7 lines
199 B
Python

from app.models.todo import Todo
from app.repositories.todos import todo_exists, remove_todo
def delete_todo(todo_id: str) -> Todo:
if todo_exists(todo_id):
return remove_todo(todo_id)