调整热度算法 & 举报自动发洞

This commit is contained in:
2022-05-28 17:30:54 +08:00
parent 9ec106872b
commit fcc8ee3b15
7 changed files with 43 additions and 19 deletions

View File

@@ -19,7 +19,7 @@ pub async fn get_systemlog(user: CurrentUser, rh: &State<RandomHasher>, rconn: R
"type": log.action_type,
"user": look!(log.user_hash),
"timestamp": log.time.timestamp(),
"detail": format!("{}\n{}", &log.target, if user.is_admin || !log.action_type.contains_ugc() { &log.detail } else { "" })
"detail": format!("{}\n{}", &log.target, &log.detail),
})
).collect::<Vec<Value>>(),
}))