fix: save report if both report_user_name and report_user_password envs are non-empty (#3134)

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
This commit is contained in:
Subhra264
2024-04-03 09:35:33 +08:00
committed by GitHub
co-authored by Hengfei Yang
parent 00fdce8c83
commit dfd3b1b1ce
+4
View File
@@ -55,6 +55,10 @@ pub async fn save(
return Err(anyhow::anyhow!("Chrome not enabled"));
}
if CONFIG.common.report_user_name.is_empty() || CONFIG.common.report_user_password.is_empty() {
return Err(anyhow::anyhow!("Report username and password ENVs not set"));
}
if !name.is_empty() {
report.name = name.to_string();
}