add: single_use products
This commit is contained in:
parent
7fbc732290
commit
e5e6d5cddb
12 changed files with 149 additions and 7 deletions
|
@ -732,6 +732,10 @@ pub fn routes() -> Router {
|
|||
"/products/{id}/on_sale",
|
||||
post(products::update_on_sale_request),
|
||||
)
|
||||
.route(
|
||||
"/products/{id}/single_use",
|
||||
post(products::update_single_use_request),
|
||||
)
|
||||
.route("/products/{id}/price", post(products::update_price_request))
|
||||
.route(
|
||||
"/products/{id}/method",
|
||||
|
@ -1275,6 +1279,11 @@ pub struct UpdateProductOnSale {
|
|||
pub on_sale: bool,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UpdateProductSingleUse {
|
||||
pub single_use: bool,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UpdateProductPrice {
|
||||
pub price: i32,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue