add: transfer refunds
This commit is contained in:
parent
95cb889080
commit
fdaae8d977
10 changed files with 340 additions and 26 deletions
|
@ -727,6 +727,10 @@ pub fn routes() -> Router {
|
|||
// transfers
|
||||
.route("/transfers", post(transfers::create_request))
|
||||
.route("/transfers/ask", post(transfers::ask_request))
|
||||
.route(
|
||||
"/transfers/{id}/refund",
|
||||
post(transfers::create_refund_request),
|
||||
)
|
||||
// products
|
||||
.route("/products", post(products::create_request))
|
||||
.route("/products/{id}", delete(products::delete_request))
|
||||
|
@ -751,6 +755,14 @@ pub fn routes() -> Router {
|
|||
post(products::update_method_request),
|
||||
)
|
||||
.route("/products/{id}/stock", post(products::update_stock_request))
|
||||
.route(
|
||||
"/products/{id}/uploads",
|
||||
post(products::update_uploads_request),
|
||||
)
|
||||
.route(
|
||||
"/products/{id}/uploads/thumbnails",
|
||||
delete(products::remove_thumbnail_request),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn lw_routes() -> Router {
|
||||
|
@ -1323,3 +1335,19 @@ pub struct AddAppliedConfiguration {
|
|||
pub struct RemoveAppliedConfiguration {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, PartialEq, Eq)]
|
||||
pub enum ProductUploadTarget {
|
||||
Thumbnails,
|
||||
Reward,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UpdateProductUploads {
|
||||
pub target: ProductUploadTarget,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct RemoveProductThumbnail {
|
||||
pub idx: usize,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue