feat: get comment & send post

This commit is contained in:
2022-03-16 00:46:55 +08:00
parent d9aec4d613
commit e373ac9ab6
10 changed files with 186 additions and 23 deletions

View File

@@ -1,6 +1,5 @@
use crate::api::{CurrentUser, API};
use crate::random_hasher::RandomHasher;
use chrono::SubsecRound;
use rocket::serde::json::{json, Value};
use rocket::State;
@@ -9,7 +8,8 @@ pub fn get_systemlog(user: CurrentUser, rh: &State<RandomHasher>) -> API<Value>
Ok(json!({
"tmp_token": rh.get_tmp_token(),
"salt": look!(rh.salt),
"start_time": rh.start_time.round_subsecs(0),
"start_time": rh.start_time.timestamp(),
"custom_title": user.custom_title,
"data": [],
}))
}