mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-20 06:28:14 -04:00
add file cutter to files route
This commit is contained in:
@@ -3,6 +3,7 @@ use crate::{
|
||||
job::Job,
|
||||
object::fs::{
|
||||
copy::{FileCopierJob, FileCopierJobInit},
|
||||
cut::{FileCutterJob, FileCutterJobInit},
|
||||
decrypt::{FileDecryptorJob, FileDecryptorJobInit},
|
||||
delete::{FileDeleterJob, FileDeleterJobInit},
|
||||
duplicate::{FileDuplicatorJob, FileDuplicatorJobInit},
|
||||
@@ -142,6 +143,14 @@ pub(crate) fn mount() -> RouterBuilder {
|
||||
library.spawn_job(Job::new(args, FileCopierJob {})).await;
|
||||
invalidate_query!(library, "locations.getExplorerData");
|
||||
|
||||
Ok(())
|
||||
})
|
||||
})
|
||||
.library_mutation("cutFiles", |t| {
|
||||
t(|_, args: FileCutterJobInit, library| async move {
|
||||
library.spawn_job(Job::new(args, FileCutterJob {})).await;
|
||||
invalidate_query!(library, "locations.getExplorerData");
|
||||
|
||||
Ok(())
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user