Add endpoint to set server time

This commit is contained in:
Ethan O'Brien
2024-05-04 18:11:20 -05:00
parent 05aecd02c6
commit 42bdc28d0f
24 changed files with 169 additions and 106 deletions

View File

@@ -3,11 +3,11 @@ use actix_web::{HttpResponse, HttpRequest};
use crate::router::global;
pub fn read(_req: HttpRequest, _body: String) -> HttpResponse {
pub fn read(req: HttpRequest, _body: String) -> HttpResponse {
let resp = object!{
"code": 0,
"server_time": global::timestamp(),
"data": {"gift_list":[],"updated_value_list":{"master_chat_room_ids":[3001001,3101001],"master_chat_chapter_ids":[300100101,310100101]},"reward_list":[{"type":16,"value":3001001,"level":0,"amount":1},{"type":16,"value":3101001,"level":0,"amount":1},{"type":17,"value":300100101,"level":0,"amount":1},{"type":17,"value":310100101,"level":0,"amount":1}],"clear_mission_ids":[]}
};
global::send(resp)
global::send(resp, req)
}