async def METHOD_NAME(
    user: UserKey,
    plan_id: str,
    set_name: str | None,
    set_favorite: bool | None,
    mod_access: bool = False,
) -> PlanView:
    await authorize_plan_access(user, plan_id, mod_access)
    if set_name is not None:
        return await _rename_plan(plan_id=plan_id, new_name=set_name)
    if set_favorite is not None:
        return await _set_favorite_plan(
            user=user,
            plan_id=plan_id,
            favorite=set_favorite,
        )
    raise HTTPException(
        status_code=400,
        detail="Must specify the attribute of Plan to update",
    )