From 4677ee1f8fe6fd0b8b1f2d9d2054ed870010d4cc Mon Sep 17 00:00:00 2001 From: creating2morrow Date: Fri, 8 Dec 2023 04:33:27 -0500 Subject: [PATCH] mount nasr and fix endpoint mapping --- neveko-core/src/order.rs | 2 +- src/controller.rs | 2 +- src/main.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/neveko-core/src/order.rs b/neveko-core/src/order.rs index f95477e..1bba73a 100644 --- a/neveko-core/src/order.rs +++ b/neveko-core/src/order.rs @@ -299,7 +299,7 @@ pub async fn trigger_nasr( let proxy = reqwest::Proxy::http(&host)?; let client = reqwest::Client::builder().proxy(proxy).build(); match client? - .post(format!("http://{}/ship/{}/{}", &customer, vendor, orid)) + .post(format!("http://{}/nasr/{}/{}", &customer, vendor, orid)) .header("proof", jwp) .send() .await diff --git a/src/controller.rs b/src/controller.rs index b89f040..3762d06 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -206,7 +206,7 @@ pub async fn request_shipment( /// vedor - `vendor's .b32.i2p` /// /// Protected: true -#[post("/ship//")] +#[post("/nasr//")] pub async fn trigger_nasr( orid: String, vendor: String, diff --git a/src/main.rs b/src/main.rs index df244d4..7a3b0af 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,6 +44,7 @@ async fn rocket() -> _ { controller::get_products, controller::request_shipment, controller::retrieve_order, + controller::trigger_nasr, ], ) }