feat: add base_path to api

Lets you replace /api with whatever you want!
This commit is contained in:
Radical 2025-05-29 20:41:50 +02:00
parent 3c5f3fd654
commit 94c4428bb0
3 changed files with 6 additions and 3 deletions

View file

@ -6,6 +6,6 @@ use actix_web::web;
mod v1;
mod versions;
pub fn web() -> Scope {
web::scope("/api").service(v1::web()).service(versions::get)
pub fn web(path: &str) -> Scope {
web::scope(path.trim_end_matches('/')).service(v1::web()).service(versions::get)
}