mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-05-03 02:39:58 -07:00
Add api for getting rayhunter's log file
This commit is contained in:
committed by
Cooper Quintin
parent
64d657efd6
commit
d7c973ea95
@@ -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()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user