This commit is contained in:
lychang
2026-07-20 00:50:45 +08:00
parent b1f0c2f36a
commit da412c1c76
7 changed files with 118 additions and 20 deletions

View File

@@ -8,6 +8,7 @@ pub use crate::models::image::Image;
impl Database {
pub async fn add_images(&self, images: Vec<CreateImage>) -> Result<Vec<Uuid>, sqlx::Error> {
let _guard = self.write_lock.lock().await;
if images.is_empty() { return Ok(Vec::new()); }
let now = chrono::Utc::now().to_rfc3339();
let mut ids = Vec::new();