feat(server): announce com validacao e persistencia + files por id
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
pub mod announce;
|
||||
pub mod files;
|
||||
pub mod health;
|
||||
|
||||
use axum::{routing::get, Router};
|
||||
use axum::{routing::{get, post}, Router};
|
||||
use tower_http::cors::CorsLayer;
|
||||
use crate::state::SharedState;
|
||||
|
||||
pub fn router(state: SharedState) -> Router {
|
||||
let api = Router::new()
|
||||
.route("/health", get(health::health))
|
||||
.route("/files/{file_id}", get(files::get_file))
|
||||
.route("/announce", post(announce::announce))
|
||||
.with_state(state);
|
||||
|
||||
Router::new()
|
||||
|
||||
Reference in New Issue
Block a user