feat: attention & redis & async

This commit is contained in:
2022-03-20 22:22:08 +08:00
parent e87d8acb7c
commit 58eb7aba6f
16 changed files with 495 additions and 211 deletions

View File

@@ -2,10 +2,10 @@ use crate::api::{CurrentUser, API};
use crate::random_hasher::RandomHasher;
use rocket::serde::json::{json, Value};
use rocket::State;
use crate::db_conn::DbConn;
use crate::db_conn::Db;
#[get("/systemlog")]
pub fn get_systemlog(user: CurrentUser, rh: &State<RandomHasher>, conn: DbConn) -> API<Value> {
pub async fn get_systemlog(user: CurrentUser, rh: &State<RandomHasher>, db: Db) -> API<Value> {
Ok(json!({
"tmp_token": rh.get_tmp_token(),
"salt": look!(rh.salt),