fix clippy & rustfmt

This commit is contained in:
2022-07-06 17:56:11 +08:00
parent 1aa86b0963
commit 25649e6280
18 changed files with 123 additions and 137 deletions

View File

@@ -1,12 +1,12 @@
use crate::api::{CurrentUser, JsonAPI};
use crate::api::{CurrentUser, JsonApi};
use crate::random_hasher::RandomHasher;
use crate::rds_conn::RdsConn;
use crate::rds_models::{Systemlog};
use crate::rds_models::Systemlog;
use rocket::serde::json::{json, Value};
use rocket::State;
#[get("/systemlog")]
pub async fn get_systemlog(user: CurrentUser, rh: &State<RandomHasher>, rconn: RdsConn) -> JsonAPI {
pub async fn get_systemlog(user: CurrentUser, rh: &State<RandomHasher>, rconn: RdsConn) -> JsonApi {
let logs = Systemlog::get_list(&rconn, 50).await?;
Ok(json!({