From db0aadf1076a15b4a6b36e392e328dc6f36a3d5e Mon Sep 17 00:00:00 2001 From: fan-tastic-z Date: Tue, 4 Jun 2024 10:00:00 +0800 Subject: [PATCH] fix: push message from model to vulninfo severtiy error --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/grab/mod.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 57ad32e..1ab3ee9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4569,7 +4569,7 @@ dependencies = [ [[package]] name = "watchvuln-rs" -version = "0.1.5" +version = "0.1.6" dependencies = [ "async-trait", "base64 0.22.1", diff --git a/Cargo.toml b/Cargo.toml index 469df72..f9677f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "watchvuln-rs" -version = "0.1.5" +version = "0.1.6" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/grab/mod.rs b/src/grab/mod.rs index c1e31e5..9dc561e 100644 --- a/src/grab/mod.rs +++ b/src/grab/mod.rs @@ -36,10 +36,10 @@ pub struct VulnInfo { impl From for VulnInfo { fn from(v: Model) -> Self { let severtiy = match v.severtiy.as_str() { - "低危" => Severity::Low, - "中危" => Severity::Medium, - "高危" => Severity::High, - "严重" => Severity::Critical, + "Low" => Severity::Low, + "Medium" => Severity::Medium, + "High" => Severity::High, + "Critical" => Severity::Critical, _ => Severity::Low, };