Bug: when getting user by id, it would try to parse i16 to i32, type
changed
This commit is contained in:
2026-05-01 18:12:24 +02:00
parent 92fdb87cf0
commit 12c618f8dd
2 changed files with 5 additions and 2 deletions

View File

@@ -220,7 +220,7 @@ pub async fn get_users(
}
pub async fn get_user_by_id(
Path(id): Path<i32>,
Path(id): Path<i16>,
State(data): State<Arc<AppState>>,
) -> Result<impl IntoResponse, (StatusCode, Json<serde_json::Value>)> {
let query = sqlx::query_as::<_, User>(r#"SELECT * FROM users WHERE id = $1"#)