mirror of
https://github.com/rjNemo/graphql_python_template
synced 2026-06-06 02:26:47 +00:00
8 lines
223 B
Python
8 lines
223 B
Python
from app.models.todo import Todo
|
|
from app.repositories.todos import edit_todo, todo_exists
|
|
|
|
|
|
def update_todo(todo_id: str, data) -> Todo:
|
|
if todo_exists(todo_id):
|
|
return edit_todo(todo_id, data)
|
|
return None
|