split rs files

This commit is contained in:
Mateusz Gruszczyński
2026-07-27 23:27:56 +02:00
parent d6c1c52310
commit 9695b2b739
15 changed files with 1694 additions and 1645 deletions
+3 -9
View File
@@ -1,3 +1,6 @@
use super::*;
use super::pads_public::authorized_pad;
pub async fn upload_pad_file(
State(state): State<SharedState>,
headers: HeaderMap,
@@ -465,15 +468,6 @@ async fn serve_token_file(
Ok(response)
}
fn bearer_token(headers: &HeaderMap) -> Option<&str> {
headers
.get(header::AUTHORIZATION)
.and_then(|value| value.to_str().ok())
.and_then(|value| value.strip_prefix("Bearer "))
.map(str::trim)
.filter(|value| !value.is_empty())
}
fn sanitize_filename(value: &str) -> String {
let name = std::path::Path::new(value)
.file_name()