Files
quoter/src/handlers/mod.rs

22 lines
630 B
Rust
Raw Normal View History

2024-10-22 00:36:42 +03:00
mod proxy;
2025-06-02 22:20:37 +03:00
mod upload;
2024-10-22 00:36:42 +03:00
mod serve_file;
pub use proxy::proxy_handler;
2025-06-02 22:20:37 +03:00
pub use upload::upload_handler;
2024-10-22 00:36:42 +03:00
// Лимит квоты на пользователя: 2 ГБ в неделю
pub const MAX_WEEK_BYTES: u64 = 2 * 1024 * 1024 * 1024;
2025-06-02 22:20:37 +03:00
use actix_web::{HttpResponse, Result, HttpRequest};
/// Обработчик для корневого пути /
pub async fn root_handler(req: HttpRequest) -> Result<HttpResponse> {
match req.method().as_str() {
"GET" => Ok(HttpResponse::Ok()
.content_type("text/plain")
.body("ok")),
_ => Ok(HttpResponse::MethodNotAllowed().finish())
}
}