24 lines
543 B
Rust
24 lines
543 B
Rust
extern crate core;
|
|
|
|
use crate::user::validator::validator;
|
|
use actix_web::web::ServiceConfig;
|
|
use actix_web::{get, web, HttpResponse, Responder};
|
|
use actix_web_httpauth::middleware::HttpAuthentication;
|
|
use crate::video::handler::download_file;
|
|
|
|
pub mod user;
|
|
pub mod video;
|
|
|
|
#[get("/health")]
|
|
async fn health() -> impl Responder {
|
|
"Ok!"
|
|
}
|
|
|
|
pub fn init(cfg: &mut ServiceConfig) {
|
|
cfg.service(download_file);
|
|
cfg.default_service(web::to(not_found));
|
|
}
|
|
|
|
async fn not_found() -> impl Responder {
|
|
HttpResponse::NotFound().finish()
|
|
} |