Add api for getting rayhunter's log file

This commit is contained in:
Sashanoraa
2025-08-08 16:10:27 -04:00
committed by Cooper Quintin
parent 64d657efd6
commit d7c973ea95
2 changed files with 8 additions and 0 deletions

View File

@@ -168,3 +168,9 @@ pub async fn get_qmdl_manifest(
current_entry,
}))
}
pub async fn get_log() -> Result<String, (StatusCode, String)> {
tokio::fs::read_to_string("/data/rayhunter/rayhunter.log")
.await
.map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))
}