manually specify creator :/
This commit is contained in:
parent
2ba98eb83d
commit
ee7f06a243
14
src/main.rs
14
src/main.rs
@ -94,7 +94,9 @@ struct CreateAssetSubcommand{
|
|||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
input_file:PathBuf,
|
input_file:PathBuf,
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
group:Option<u64>,
|
creator_user_id:u64,
|
||||||
|
#[arg(long)]
|
||||||
|
creator_group_id:Option<u64>,
|
||||||
}
|
}
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
struct UpdateAssetSubcommand{
|
struct UpdateAssetSubcommand{
|
||||||
@ -333,7 +335,8 @@ async fn main()->AResult<()>{
|
|||||||
subcommand.api_key_envvar,
|
subcommand.api_key_envvar,
|
||||||
subcommand.api_key_file,
|
subcommand.api_key_file,
|
||||||
).await?.get(),
|
).await?.get(),
|
||||||
group:subcommand.group,
|
creator_user_id:subcommand.creator_user_id,
|
||||||
|
creator_group_id:subcommand.creator_group_id,
|
||||||
input_file:subcommand.input_file,
|
input_file:subcommand.input_file,
|
||||||
model_name:subcommand.model_name,
|
model_name:subcommand.model_name,
|
||||||
description:subcommand.description.unwrap_or_else(||String::with_capacity(0)),
|
description:subcommand.description.unwrap_or_else(||String::with_capacity(0)),
|
||||||
@ -443,7 +446,8 @@ struct CreateConfig{
|
|||||||
model_name:String,
|
model_name:String,
|
||||||
description:String,
|
description:String,
|
||||||
input_file:PathBuf,
|
input_file:PathBuf,
|
||||||
group:Option<u64>,
|
creator_user_id:u64,
|
||||||
|
creator_group_id:Option<u64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
///This is hardcoded to create models atm
|
///This is hardcoded to create models atm
|
||||||
@ -455,8 +459,8 @@ async fn create(config:CreateConfig)->AResult<()>{
|
|||||||
description:config.description,
|
description:config.description,
|
||||||
creationContext:rbx_asset::context::CreationContext{
|
creationContext:rbx_asset::context::CreationContext{
|
||||||
creator:rbx_asset::context::Creator{
|
creator:rbx_asset::context::Creator{
|
||||||
userId:0,//ever needed? roblox should implicitly know this
|
userId:config.creator_user_id,
|
||||||
groupId:config.group.unwrap_or(0),
|
groupId:config.creator_group_id.unwrap_or(0),
|
||||||
},
|
},
|
||||||
expectedPrice:0,
|
expectedPrice:0,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user