Ability to fix broken event data
All checks were successful
Build docker images / build (push) Successful in 55m27s

This commit is contained in:
Ethan O'Brien 2024-07-23 22:22:16 -05:00
parent 7829e01a47
commit 38d395d9a6

View file

@ -14,6 +14,11 @@ fn get_event_data(key: &str, event_id: u32) -> JsonValue {
let is_star_event = STAR_EVENT_IDS.contains(&event_id);
//println!("is_star_event: {}, {}", is_star_event, event_id);
// Broken event data.. Should no longer be possible.
if is_star_event && event[event_id.to_string()]["star_event"]["star_music_list"].len() > 5 {
event.remove(&event_id.to_string());
}
if event[event_id.to_string()].is_empty() {
event[event_id.to_string()] = json::parse(&include_file!("src/router/userdata/new_user_event.json")).unwrap();
if is_star_event {