fixed split packages being possibly null
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -19,7 +19,7 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
||||
|
||||
[[package]]
|
||||
name = "alhp_api"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
dependencies = [
|
||||
"log",
|
||||
"reqwest",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "alhp_api"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
edition = "2024"
|
||||
authors = ["mpuchstein"]
|
||||
|
||||
|
@@ -50,7 +50,7 @@ pub mod packages {
|
||||
pub struct Package {
|
||||
pub pkgbase: String,
|
||||
pub repo: String,
|
||||
pub split_packages: Vec<String>,
|
||||
pub split_packages: Option<Vec<String>>,
|
||||
pub status: PackageStatus,
|
||||
pub skip_reason: Option<String>,
|
||||
pub lto: String,
|
||||
@@ -110,7 +110,7 @@ pub mod packages {
|
||||
StatusCode::OK => {
|
||||
let response = response.text()?;
|
||||
match serde_json::from_str(&response) {
|
||||
Ok(pkgResponse) => Ok(pkgResponse),
|
||||
Ok(pkg_response) => Ok(pkg_response),
|
||||
Err(e) => {
|
||||
error!("Failed to deserialize JSON: {}", e);
|
||||
error!("Response body: {}", response);
|
||||
@@ -179,7 +179,7 @@ pub mod general {
|
||||
StatusCode::OK => {
|
||||
let response = response.text()?;
|
||||
match serde_json::from_str(&response) {
|
||||
Ok(genResponse) => Ok(genResponse),
|
||||
Ok(gen_response) => Ok(gen_response),
|
||||
Err(e) => {
|
||||
error!("Failed to deserialize JSON: {}", e);
|
||||
error!("Response body: {}", response);
|
||||
|
Reference in New Issue
Block a user