mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-08 07:12:49 +00:00
add file cutter to files route
This commit is contained in:
parent
6b5af02b87
commit
1397d84e15
|
@ -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(())
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue