it appears actix-web's scope behaviour has changed in the latest beta

release:

Routes 404'd when scope contained trailing slash like so:
let scope = "/api/v1/pow/";
web::scope(scope)//

So had to rm trailing slash in scope
This commit is contained in:
realaravinth
2021-11-29 17:33:08 +05:30
parent f2f8632679
commit b5af9ee259
9 changed files with 53 additions and 127 deletions

View File

@@ -36,9 +36,7 @@ pub struct ValidationToken {
/// route handler that verifies PoW and issues a solution token
/// if verification is successful
#[my_codegen::post(
path = "V1_API_ROUTES.pow.verify_pow.strip_prefix(V1_API_ROUTES.pow.scope).unwrap()"
)]
#[my_codegen::post(path = "V1_API_ROUTES.pow.verify_pow()")]
pub async fn verify_pow(
payload: web::Json<Work>,
data: AppData,