Update deprecated functions
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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())
|
||||||
|
|||||||
Reference in New Issue
Block a user