Fix some type comparisons

This commit is contained in:
Ethan O'Brien
2024-05-24 19:59:24 -05:00
parent ba0d38fb2d
commit 09fbf027b1
7 changed files with 17 additions and 17 deletions

View File

@@ -23,7 +23,7 @@ pub fn preset(req: HttpRequest, body: String) -> Option<JsonValue> {
fn check_gifts(user: &mut JsonValue) {
let mut to_remove = array![];
for (j, data) in user["home"]["gift_list"].members().enumerate() {
if data["is_receive"] == "1" || data["expire_date_time"].as_u64().unwrap() < global::timestamp() {
if data["is_receive"] == 1 || data["expire_date_time"].as_u64().unwrap() < global::timestamp() {
to_remove.push(j).unwrap();
}
}