typo: maches -> matches
This commit is contained in:
parent
a1d7760b72
commit
f7655005ff
2 changed files with 3 additions and 2 deletions
|
@ -154,7 +154,7 @@ pub fn find_match(id: i32, conn: &PgConnection) -> QueryResult<FullMatchData> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn find_mach_base(id: i32, conn: &PgConnection) -> QueryResult<MatchBase> {
|
pub fn find_match_base(id: i32, conn: &PgConnection) -> QueryResult<MatchBase> {
|
||||||
matches::table.find(id).get_result::<MatchBase>(conn)
|
matches::table.find(id).get_result::<MatchBase>(conn)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,8 @@ pub async fn get_match_log(
|
||||||
Path(match_id): Path<i32>,
|
Path(match_id): Path<i32>,
|
||||||
conn: DatabaseConnection,
|
conn: DatabaseConnection,
|
||||||
) -> Result<Vec<u8>, StatusCode> {
|
) -> Result<Vec<u8>, StatusCode> {
|
||||||
let match_base = matches::find_mach_base(match_id, &conn).map_err(|_| StatusCode::NOT_FOUND)?;
|
let match_base =
|
||||||
|
matches::find_match_base(match_id, &conn).map_err(|_| StatusCode::NOT_FOUND)?;
|
||||||
let log_path = PathBuf::from(MATCHES_DIR).join(&match_base.log_path);
|
let log_path = PathBuf::from(MATCHES_DIR).join(&match_base.log_path);
|
||||||
let log_contents = std::fs::read(log_path).map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?;
|
let log_contents = std::fs::read(log_path).map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?;
|
||||||
Ok(log_contents)
|
Ok(log_contents)
|
||||||
|
|
Loading…
Reference in a new issue