init
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use serde::Deserialize;
|
||||
use std::path::PathBuf;
|
||||
use config;
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct Config {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user