示例#1
0
async def save_user(user: User) -> User:
    if user.userId is None or check_fake_id(user.userId):
        result = create_user_storage(user)
        sync_user_to_user_groups(result)
        return result
    else:
        sync_user_to_user_groups(user)
        return update_user_storage(user)
示例#2
0
async def save_user(user: User):
    if user.userId is None or check_fake_id(user.userId):
        return create_user_storage(user)
    else:
        return update_user_storage(user)