mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-07-14 17:52:20 +08:00
Clean up event storage
This commit is contained in:
@@ -136,7 +136,7 @@ fn add_user_to_database(uid: i64, user: JsonValue, user_home: JsonValue, user_mi
|
||||
));
|
||||
DATABASE.lock_and_exec("INSERT INTO event (user_id, event) VALUES (?1, ?2)", params!(
|
||||
uid,
|
||||
include_file!("src/router/userdata/new_user_event.json")
|
||||
"{}"
|
||||
));
|
||||
DATABASE.lock_and_exec("INSERT INTO eventloginbonus (user_id, eventloginbonus) VALUES (?1, ?2)", params!(
|
||||
uid,
|
||||
@@ -254,7 +254,7 @@ pub fn get_acc_chats(auth_key: &str) -> JsonValue {
|
||||
pub fn get_acc_event(auth_key: &str) -> JsonValue {
|
||||
let event = get_data(auth_key, "event");
|
||||
if event.is_empty() {
|
||||
return json::parse(&include_file!("src/router/userdata/new_user_event.json")).unwrap();
|
||||
return object!{};
|
||||
}
|
||||
event
|
||||
}
|
||||
|
||||
@@ -1,24 +1,21 @@
|
||||
{
|
||||
"event_data": {
|
||||
"point_ranking": {
|
||||
"point": 0
|
||||
},
|
||||
"score_ranking": [],
|
||||
"member_ranking": [],
|
||||
"lottery_box": [],
|
||||
"mission_list": [],
|
||||
"policy_agreement": 0,
|
||||
"incentive_lottery": 0,
|
||||
"star_event": {
|
||||
"star_level": 0,
|
||||
"last_event_star_level": 0,
|
||||
"star_music_list": [],
|
||||
"music_change_count": 0,
|
||||
"star_event_bonus_daily_count": 0,
|
||||
"star_event_bonus_count": 0,
|
||||
"star_event_play_times_bonus_count": 0,
|
||||
"star_assist_bonus": 1
|
||||
}
|
||||
"point_ranking": {
|
||||
"point": 0
|
||||
},
|
||||
"server_event_data": {}
|
||||
"score_ranking": [],
|
||||
"member_ranking": [],
|
||||
"lottery_box": [],
|
||||
"mission_list": [],
|
||||
"policy_agreement": 0,
|
||||
"incentive_lottery": 0,
|
||||
"star_event": {
|
||||
"star_level": 0,
|
||||
"last_event_star_level": 0,
|
||||
"star_music_list": [],
|
||||
"music_change_count": 0,
|
||||
"star_event_bonus_daily_count": 0,
|
||||
"star_event_bonus_count": 0,
|
||||
"star_event_play_times_bonus_count": 0,
|
||||
"star_assist_bonus": 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user