Skip to content

Commit

Permalink
refactor(server): trash endpoints (immich-app#6652)
Browse files Browse the repository at this point in the history
* refactor(server): trash endpoints

* chore: open api

* chore: fix wrong rename
  • Loading branch information
jrasm91 authored Jan 26, 2024
1 parent 3375768 commit 96b7885
Show file tree
Hide file tree
Showing 27 changed files with 967 additions and 137 deletions.
6 changes: 3 additions & 3 deletions mobile/lib/modules/trash/services/trash.service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -32,15 +32,15 @@ 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);
}
}

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);
}
Expand Down
3 changes: 3 additions & 0 deletions mobile/openapi/.openapi-generator/FILES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions mobile/openapi/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions mobile/openapi/doc/AssetApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

170 changes: 170 additions & 0 deletions mobile/openapi/doc/TrashApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mobile/openapi/lib/api.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 96b7885

Please sign in to comment.