refactor: rewrite entire codebase in axum instead of actix
Replaces actix with axum for web, allows us to use socket.io and gives us access to the tower ecosystem of middleware breaks compatibility with our current websocket implementation, needs to be reimplemented for socket.io
This commit is contained in:
parent
3647086adb
commit
324137ce8b
47 changed files with 1381 additions and 1129 deletions
|
@ -1,13 +1,16 @@
|
|||
//! `/api` Contains the entire API
|
||||
|
||||
use actix_web::Scope;
|
||||
use actix_web::web;
|
||||
use std::sync::Arc;
|
||||
|
||||
use axum::{Router, routing::get};
|
||||
|
||||
use crate::AppState;
|
||||
|
||||
mod v1;
|
||||
mod versions;
|
||||
|
||||
pub fn web(path: &str) -> Scope {
|
||||
web::scope(path.trim_end_matches('/'))
|
||||
.service(v1::web())
|
||||
.service(versions::get)
|
||||
pub fn router() -> Router<Arc<AppState>> {
|
||||
Router::new()
|
||||
.route("/versions", get(versions::versions))
|
||||
.nest("/v1", v1::router())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue