Пример #1
0
async def save_space(space: Space, current_user: User = Depends(deps.get_current_user)):
    if space.spaceId is None or check_fake_id(space.spaceId):
        # sync space group id
        result = create_space(space)
        sync_space_to_user_group(result)
        return result
    else:
        sync_space_to_user_group(space)
        return update_space_by_id(space.spaceId, space)
Пример #2
0
async def save_space(space: Space, current_user: User = Depends(deps.get_current_user)):
    if space.spaceId is None or check_fake_id(space.spaceId):
        return create_space(space)
    else:
        return update_space_by_id(space.spaceId, space)