You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-06 06:07:29 +02:00
fix(server): correct openapi response type for getServerLicense() (#11261)
* fix(server): correct openapi response type for getServerLicense() * return 404 error when license doesn't exist * update e2e test
This commit is contained in:
4
mobile/openapi/lib/api/server_api.dart
generated
4
mobile/openapi/lib/api/server_api.dart
generated
@ -75,7 +75,7 @@ class ServerApi {
|
||||
);
|
||||
}
|
||||
|
||||
Future<Object?> getServerLicense() async {
|
||||
Future<LicenseResponseDto?> getServerLicense() async {
|
||||
final response = await getServerLicenseWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
@ -84,7 +84,7 @@ class ServerApi {
|
||||
// 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) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LicenseResponseDto',) as LicenseResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user