Added a new api: "/api/supported_versions" to query the server of supported API versions
This commit is contained in:
parent
89b2a2ae51
commit
bb5fb386a7
3 changed files with 18 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
use actix_web::{HttpServer, web};
|
||||
|
||||
use crate::api::endpoints_v1;
|
||||
use crate::api::api;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub async fn stop_actix_web(server: actix_web::dev::Server) -> std::io::Result<()> {
|
||||
|
@ -17,6 +18,7 @@ pub fn start_actix_web(port: u16) -> std::io::Result<actix_web::dev::Server> {
|
|||
let logger = actix_web::middleware::Logger::default();
|
||||
actix_web::App::new()
|
||||
.wrap(logger)
|
||||
.service(web::scope("/api").configure(api::configure))
|
||||
.service(web::scope("/v1").configure(endpoints_v1::configure))
|
||||
})
|
||||
.bind(("127.0.0.1", port))?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue