This commit is contained in:
lychang
2026-03-20 03:16:52 +08:00
parent 5893cd5e31
commit 6b48bb0926
6 changed files with 78 additions and 136 deletions

View File

@@ -1,5 +1,6 @@
use serde::Deserialize;
use std::path::PathBuf;
use config;
#[derive(Debug, Deserialize, Clone)]
pub struct Config {

View File

@@ -56,7 +56,6 @@ impl Database {
a.created_at
FROM albums a
LEFT JOIN images img ON img.album_id = a.id
LEFT JOIN images i ON i.id = a.cover_image_id
ORDER BY a.document DESC
"#
)
@@ -179,7 +178,7 @@ impl Database {
// 获取相册中的图片
let image_rows = sqlx::query(
"SELECT * FROM images WHERE album_id = ? ORDER BY created_at ASC"
"SELECT * FROM images WHERE album_id = ?"
)
.bind(album_id.to_string())
.fetch_all(&self.pool)