From 982e5a3b5c9dea624e442e0a386dd72b987bfd47 Mon Sep 17 00:00:00 2001 From: tsunyoku Date: Sat, 27 Apr 2024 13:29:34 +0100 Subject: [PATCH] fix pp type on new user_stats --- src/processor/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/processor/mod.rs b/src/processor/mod.rs index 6c842d2..1ca60fe 100644 --- a/src/processor/mod.rs +++ b/src/processor/mod.rs @@ -318,7 +318,7 @@ async fn handle_queue_request( .await?; } - let old_pp: i32 = + let old_pp: u32 = sqlx::query_scalar(r#"SELECT pp FROM user_stats WHERE user_id = ? AND mode = ?"#) .bind(request.user_id) .bind(rework.mode + (rework.rx * 4)) @@ -328,7 +328,7 @@ async fn handle_queue_request( let rework_stats = ReworkStats { user_id: request.user_id, rework_id: rework.rework_id, - old_pp, + old_pp: old_pp as i32, new_pp, };