From ee7f06a2433104ac5b4ba589b28f0fe08dd978d3 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 3 Jul 2024 11:03:58 -0700 Subject: [PATCH] manually specify creator :/ --- src/main.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9fc9f17..90c481d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -94,7 +94,9 @@ struct CreateAssetSubcommand{ #[arg(long)] input_file:PathBuf, #[arg(long)] - group:Option, + creator_user_id:u64, + #[arg(long)] + creator_group_id:Option, } #[derive(Args)] struct UpdateAssetSubcommand{ @@ -333,7 +335,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)), @@ -443,7 +446,8 @@ struct CreateConfig{ model_name:String, description:String, input_file:PathBuf, - group:Option, + creator_user_id:u64, + creator_group_id:Option, } ///This is hardcoded to create models atm @@ -455,8 +459,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, }