Perses finale (#558)

* Move v2 routes to v2 module

* Remove v1 routes and make it run

* Make config declaration consistent, add v3 module

* Readd API v1 msgs

* Fix imports
This commit is contained in:
triphora
2023-03-16 14:56:04 -04:00
committed by GitHub
parent 0271337f8e
commit 3c2f144795
28 changed files with 264 additions and 911 deletions

13
src/routes/v3/mod.rs Normal file
View File

@@ -0,0 +1,13 @@
pub use super::ApiError;
use actix_web::{web, HttpResponse};
use serde_json::json;
pub fn config(cfg: &mut web::ServiceConfig) {
cfg.service(web::scope("v3").route("", web::get().to(hello_world)));
}
pub async fn hello_world() -> Result<HttpResponse, ApiError> {
Ok(HttpResponse::Ok().json(json!({
"hello": "world",
})))
}