docs
Some checks failed
CI / test (push) Failing after 4m0s
CI / lint (push) Failing after 4s
CI / deploy (push) Has been skipped

This commit is contained in:
2025-08-02 00:18:09 +03:00
parent adda2b30f9
commit ea92a376ed
32 changed files with 3360 additions and 280 deletions

View File

@@ -1,21 +1,21 @@
mod proxy;
mod upload;
mod quota;
mod serve_file;
mod upload;
pub use proxy::proxy_handler;
pub use quota::{get_quota_handler, increase_quota_handler, set_quota_handler};
pub use upload::upload_handler;
// Лимит квоты на пользователя: 2 ГБ в неделю
pub const MAX_WEEK_BYTES: u64 = 2 * 1024 * 1024 * 1024;
// Общий лимит квоты на пользователя: 5 ГБ
pub const MAX_USER_QUOTA_BYTES: u64 = 5 * 1024 * 1024 * 1024;
use actix_web::{HttpResponse, Result, HttpRequest};
use actix_web::{HttpRequest, HttpResponse, Result};
/// Обработчик для корневого пути /
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())
"GET" => Ok(HttpResponse::Ok().content_type("text/plain").body("ok")),
_ => Ok(HttpResponse::MethodNotAllowed().finish()),
}
}