def register(): api = EPyTodoAPI() return api.register_user(request.json)
def add_task(): api = EPyTodoAPI() return api.add_task(request.json)
def delete_task(id: int): api = EPyTodoAPI() return api.delete_task(id)
def get_or_update_task(id: int): api = EPyTodoAPI() if request.method == "POST": return api.update_task(id, request.json) return api.get_task_infos(id)
def tasks(): api = EPyTodoAPI() return api.get_all_user_tasks()
def user(): api = EPyTodoAPI() return api.get_user_infos()
def logout(): api = EPyTodoAPI() return api.logout_user()
def login(): api = EPyTodoAPI() return api.login_user(request.json)