mirror of
https://github.com/rjNemo/graphql_python_template
synced 2026-06-06 02:26:47 +00:00
11 lines
294 B
Python
11 lines
294 B
Python
from typing import Tuple
|
|
|
|
from app.models.user import User
|
|
from app.repositories.users import edit_user, user_exists
|
|
|
|
|
|
def update_user(user_id: str, data: dict) -> Tuple[User, bool]:
|
|
if not user_exists(user_id=user_id):
|
|
return None, False
|
|
|
|
return edit_user(user_id, data), True
|