From 3e151feaef26593565f88a734ef459b43e9c799f Mon Sep 17 00:00:00 2001 From: Ethan O'Brien <77750390+ethanaobrien@users.noreply.github.com> Date: Wed, 8 May 2024 21:27:25 -0500 Subject: [PATCH] Fix deck I think --- src/router/user.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/user.rs b/src/router/user.rs index a16c3d2..eb24686 100644 --- a/src/router/user.rs +++ b/src/router/user.rs @@ -11,7 +11,7 @@ pub fn deck(req: HttpRequest, body: String) -> HttpResponse { let mut user = userdata::get_acc(&key); for (i, data) in user["deck_list"].members().enumerate() { - if data["slot"].to_string() == body["slot"].to_string() { + if data["slot"].as_i32().unwrap() == body["slot"].as_i32().unwrap() { user["deck_list"][i]["main_card_ids"] = body["main_card_ids"].clone(); break; }