add user_count in systemlog

This commit is contained in:
2023-05-04 03:58:13 +08:00
parent 959e6caa1d
commit bbed041253
4 changed files with 33 additions and 3 deletions

View File

@@ -450,6 +450,11 @@ impl User {
.unwrap();
UserCache::clear_all(rconn).await;
}
pub async fn get_count(db: &Db) -> QueryResult<i64> {
db.run(move |c| users::table.count().get_result(with_log!(c)))
.await
}
}
#[derive(Insertable)]