manually specify creator :/

This commit is contained in:
Quaternions 2024-07-03 11:03:58 -07:00
parent b72bed638d
commit d468113e51

View File

@ -94,7 +94,9 @@ struct CreateAssetSubcommand{
#[arg(long)]
input_file:PathBuf,
#[arg(long)]
group:Option<u64>,
creator_user_id:u64,
#[arg(long)]
creator_group_id:Option<u64>,
}
#[derive(Args)]
struct UpdateAssetSubcommand{
@ -329,7 +331,8 @@ async fn main()->AResult<()>{
subcommand.api_key_envvar,
subcommand.api_key_file,
).await?.get(),
group:subcommand.group,
creator_user_id:subcommand.creator_user_id,
creator_group_id:subcommand.creator_group_id,
input_file:subcommand.input_file,
model_name:subcommand.model_name,
description:subcommand.description.unwrap_or_else(||String::with_capacity(0)),
@ -439,7 +442,8 @@ struct CreateConfig{
model_name:String,
description:String,
input_file:PathBuf,
group:Option<u64>,
creator_user_id:u64,
creator_group_id:Option<u64>,
}
///This is hardcoded to create models atm
@ -451,8 +455,8 @@ async fn create(config:CreateConfig)->AResult<()>{
description:config.description,
creationContext:rbx_asset::context::CreationContext{
creator:rbx_asset::context::Creator{
userId:0,//ever needed? roblox should implicitly know this
groupId:config.group.unwrap_or(0),
userId:config.creator_user_id,
groupId:config.creator_group_id.unwrap_or(0),
},
expectedPrice:0,
}