Skip to content

Commit

Permalink
Merge pull request #70 from fekie/dev-main
Browse files Browse the repository at this point in the history
chore: fix expected price for t-shirt
  • Loading branch information
fekie authored May 20, 2024
2 parents 1d4686c + af6767c commit fbe6ef4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT"
name = "roboat"
readme = "README.md"
repository = "https://github.com/Chloe-Woahie/roboat"
version = "0.34.4"
version = "0.34.5"

[dependencies]
reqwest = { version = "0.11.14", default-features = false, features = [
Expand Down
7 changes: 6 additions & 1 deletion src/bedev2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,9 +633,14 @@ mod internal {
ClassicClothingType::TShirt => "Tshirt",
};

let expected_price = match classic_clothing_type {
ClassicClothingType::Shirt | ClassicClothingType::Pants => 10,
ClassicClothingType::TShirt => 0,
};

let form = reqwest::multipart::Form::new()
.part("fileContent", reqwest::multipart::Part::bytes(tokio::fs::read(image_path).await?).file_name(filename))
.text("request", format!("{{\"displayName\":\"{}\",\"description\":\"{}\",\"assetType\":\"{}\",\"creationContext\":{{\"creator\":{{\"groupId\":{}}},\"expectedPrice\":10}}}}", name, description, asset_name_patch, group_id));
.text("request", format!("{{\"displayName\":\"{name}\",\"description\":\"{description}\",\"assetType\":\"{asset_name_patch}\",\"creationContext\":{{\"creator\":{{\"groupId\":{group_id}}},\"expectedPrice\":{expected_price}}}}}" ));

let cookie_string = self.cookie_string()?;
let xcsrf = self.xcsrf().await;
Expand Down

0 comments on commit fbe6ef4

Please sign in to comment.