Fixed builtin help response

This commit is contained in:
J-onasJones 2023-12-13 04:24:29 +01:00
parent f93e034373
commit 32b0c87c00

View file

@ -2,7 +2,7 @@ use warp::Filter;
pub fn get_builtin_routes() -> impl warp::Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
warp::path("v1")
.and((warp::path("help").map(|| "help"))
.and((warp::path("help").map(|| "Please refer to the wiki at https://wiki.jonasjones.dev/Api/"))
.or(warp::path("ping").map(|| "pong"))
.or(warp::path("version").map(|| warp::reply::json(&[option_env!("CARGO_PKG_VERSION").unwrap_or("unknown")]))))
}