mirror of
https://github.com/immich-app/immich.git
synced 2026-05-22 15:02:32 -04:00
chore(web): sort imports (#27922)
* feat: sort imports * fix: something?
This commit is contained in:
Generated
+9
-1
@@ -281,11 +281,19 @@ class ServerApi {
|
||||
/// Get product key
|
||||
///
|
||||
/// Retrieve information about whether the server currently has a product key registered.
|
||||
Future<void> getServerLicense() async {
|
||||
Future<UserLicense?> getServerLicense() async {
|
||||
final response = await getServerLicenseWithHttpInfo();
|
||||
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) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserLicense',) as UserLicense;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get statistics
|
||||
|
||||
Reference in New Issue
Block a user