1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-24 04:46:50 +02:00

chore(server): remove old device id endpoint (#6578)

* chore: remove old endpoint

* chore: open api

* chore: remove old tests
This commit is contained in:
Jason Rasmussen
2024-01-22 21:54:53 -05:00
committed by GitHub
parent 234a95960b
commit a00768c9e5
13 changed files with 8 additions and 346 deletions

View File

@ -1267,62 +1267,6 @@ class AssetApi {
return null;
}
/// Use /asset/device/:deviceId instead - Remove in 1.92 release
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] deviceId (required):
Future<Response> getUserAssetsByDeviceIdWithHttpInfo(String deviceId,) async {
// ignore: prefer_const_declarations
final path = r'/asset/{deviceId}'
.replaceAll('{deviceId}', deviceId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Use /asset/device/:deviceId instead - Remove in 1.92 release
///
/// Parameters:
///
/// * [String] deviceId (required):
Future<List<String>?> getUserAssetsByDeviceId(String deviceId,) async {
final response = await getUserAssetsByDeviceIdWithHttpInfo(deviceId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<String>') as List)
.cast<String>()
.toList();
}
return null;
}
/// Performs an HTTP 'POST /asset/restore' operation and returns the [Response].
/// Parameters:
///