mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): trash endpoints (#6652)
* refactor(server): trash endpoints * chore: open api * chore: fix wrong rename
This commit is contained in:
parent
33757689fe
commit
96b7885583
27 changed files with 967 additions and 137 deletions
|
|
@ -22,7 +22,7 @@ class TrashService {
|
|||
try {
|
||||
List<String> remoteIds =
|
||||
assetList.where((a) => a.isRemote).map((e) => e.remoteId!).toList();
|
||||
await _apiService.assetApi.restoreAssets(BulkIdsDto(ids: remoteIds));
|
||||
await _apiService.assetApi.restoreAssetsOld(BulkIdsDto(ids: remoteIds));
|
||||
return true;
|
||||
} catch (error, stack) {
|
||||
_log.severe("Cannot restore assets ${error.toString()}", error, stack);
|
||||
|
|
@ -32,7 +32,7 @@ class TrashService {
|
|||
|
||||
Future<void> emptyTrash() async {
|
||||
try {
|
||||
await _apiService.assetApi.emptyTrash();
|
||||
await _apiService.assetApi.emptyTrashOld();
|
||||
} catch (error, stack) {
|
||||
_log.severe("Cannot empty trash ${error.toString()}", error, stack);
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ class TrashService {
|
|||
|
||||
Future<void> restoreTrash() async {
|
||||
try {
|
||||
await _apiService.assetApi.restoreTrash();
|
||||
await _apiService.assetApi.restoreTrashOld();
|
||||
} catch (error, stack) {
|
||||
_log.severe("Cannot restore trash ${error.toString()}", error, stack);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue