feature/shuffle-sort #30

Merged
cameron merged 21 commits from feature/shuffle-sort into master 2024-12-06 16:25:44 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit a668b14116 - Show all commits

View File

@@ -73,8 +73,8 @@ pub async fn list_photos<TagD: TagDao, FS: FileSystemAccess>(
.filter(|file_path| file_path.starts_with(search_path)) .filter(|file_path| file_path.starts_with(search_path))
.collect() .collect()
}) })
.map(|tagged_files| { .map(|tagged_files: Vec<String>| {
trace!("Found tagged files: {:?}", tagged_files); trace!("Found {:?} tagged files: {:?}", tagged_files.len(), tagged_files);
HttpResponse::Ok().json(PhotosResponse { HttpResponse::Ok().json(PhotosResponse {
photos: tagged_files, photos: tagged_files,

View File

@@ -276,7 +276,7 @@ impl TagDao for SqliteTagDao {
.with_context(|| format!("Unable to insert tag {:?} in Sqlite", name)) .with_context(|| format!("Unable to insert tag {:?} in Sqlite", name))
.and_then(|_| { .and_then(|_| {
info!("Inserted tag: {:?}", name); info!("Inserted tag: {:?}", name);
sql_function! { define_sql_function! {
fn last_insert_rowid() -> diesel::sql_types::Integer; fn last_insert_rowid() -> diesel::sql_types::Integer;
} }
diesel::select(last_insert_rowid()) diesel::select(last_insert_rowid())
@@ -329,7 +329,7 @@ impl TagDao for SqliteTagDao {
.with_context(|| format!("Unable to tag file {:?} in sqlite", path)) .with_context(|| format!("Unable to tag file {:?} in sqlite", path))
.and_then(|_| { .and_then(|_| {
info!("Inserted tagged photo: {:#} -> {:?}", tag_id, path); info!("Inserted tagged photo: {:#} -> {:?}", tag_id, path);
sql_function! { define_sql_function! {
fn last_insert_rowid() -> diesel::sql_types::Integer; fn last_insert_rowid() -> diesel::sql_types::Integer;
} }
diesel::select(last_insert_rowid()) diesel::select(last_insert_rowid())