Bux fix
Bug: when getting user by id, it would try to parse i16 to i32, type changed
This commit is contained in:
@@ -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"#)
|
||||
|
||||
Reference in New Issue
Block a user