forked from Eeveid/lightOps
修复发布构建编译错误
This commit is contained in:
@@ -2750,7 +2750,7 @@ async fn open_or_update_alert_event(
|
||||
.bind(value)
|
||||
.bind(threshold)
|
||||
.bind(severity)
|
||||
.bind(message)
|
||||
.bind(&message)
|
||||
.bind(now)
|
||||
.bind(id)
|
||||
.execute(&state.pool)
|
||||
@@ -2768,7 +2768,7 @@ async fn open_or_update_alert_event(
|
||||
.bind(value)
|
||||
.bind(threshold)
|
||||
.bind(severity)
|
||||
.bind(message)
|
||||
.bind(&message)
|
||||
.bind(&now)
|
||||
.bind(&now)
|
||||
.execute(&state.pool)
|
||||
|
||||
@@ -16,7 +16,7 @@ use lightops_common::api::ApiResponse;
|
||||
use serde::Deserialize;
|
||||
use serde_json::{json, Value};
|
||||
use sqlx::Row;
|
||||
use std::{fs, path::Path};
|
||||
use std::{fs, path::Path as FsPath};
|
||||
use uuid::Uuid;
|
||||
|
||||
const STORE_INSTALL_TIMEOUT_SECS: u64 = 600;
|
||||
@@ -161,7 +161,7 @@ async fn list_store_apps(
|
||||
.filter(|app| {
|
||||
q.category
|
||||
.as_ref()
|
||||
.is_none_or(|category| app.category == category)
|
||||
.is_none_or(|category| app.category == *category)
|
||||
})
|
||||
.filter(|app| {
|
||||
q.q.as_ref().is_none_or(|keyword| {
|
||||
@@ -760,14 +760,14 @@ fn render_compose(
|
||||
}
|
||||
|
||||
fn catalog() -> Vec<StoreApp> {
|
||||
let configured = load_catalog_from_dir(Path::new(STORE_CATALOG_DIR));
|
||||
let configured = load_catalog_from_dir(FsPath::new(STORE_CATALOG_DIR));
|
||||
if !configured.is_empty() {
|
||||
return configured;
|
||||
}
|
||||
default_catalog()
|
||||
}
|
||||
|
||||
fn load_catalog_from_dir(dir: &Path) -> Vec<StoreApp> {
|
||||
fn load_catalog_from_dir(dir: &FsPath) -> Vec<StoreApp> {
|
||||
let Ok(entries) = fs::read_dir(dir) else {
|
||||
return Vec::new();
|
||||
};
|
||||
@@ -797,7 +797,7 @@ fn load_catalog_from_dir(dir: &Path) -> Vec<StoreApp> {
|
||||
}
|
||||
}
|
||||
}
|
||||
apps.sort_by(|left, right| left.name.cmp(&right.name));
|
||||
apps.sort_by(|left: &StoreApp, right: &StoreApp| left.name.cmp(&right.name));
|
||||
apps
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user