mirror of
https://github.com/immich-app/immich.git
synced 2026-04-28 12:13:09 -07:00
chore!: remove /api/server/theme endpoint (#27880)
chore: remove server/theme endpoint
This commit is contained in:
2
mobile/openapi/README.md
generated
2
mobile/openapi/README.md
generated
@@ -231,7 +231,6 @@ Class | Method | HTTP request | Description
|
||||
*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version | Get server version
|
||||
*ServerApi* | [**getStorage**](doc//ServerApi.md#getstorage) | **GET** /server/storage | Get storage
|
||||
*ServerApi* | [**getSupportedMediaTypes**](doc//ServerApi.md#getsupportedmediatypes) | **GET** /server/media-types | Get supported media types
|
||||
*ServerApi* | [**getTheme**](doc//ServerApi.md#gettheme) | **GET** /server/theme | Get theme
|
||||
*ServerApi* | [**getVersionCheck**](doc//ServerApi.md#getversioncheck) | **GET** /server/version-check | Get version check status
|
||||
*ServerApi* | [**getVersionHistory**](doc//ServerApi.md#getversionhistory) | **GET** /server/version-history | Get version history
|
||||
*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping | Ping
|
||||
@@ -536,7 +535,6 @@ Class | Method | HTTP request | Description
|
||||
- [ServerPingResponse](doc//ServerPingResponse.md)
|
||||
- [ServerStatsResponseDto](doc//ServerStatsResponseDto.md)
|
||||
- [ServerStorageResponseDto](doc//ServerStorageResponseDto.md)
|
||||
- [ServerThemeDto](doc//ServerThemeDto.md)
|
||||
- [ServerVersionHistoryResponseDto](doc//ServerVersionHistoryResponseDto.md)
|
||||
- [ServerVersionResponseDto](doc//ServerVersionResponseDto.md)
|
||||
- [SessionCreateDto](doc//SessionCreateDto.md)
|
||||
|
||||
1
mobile/openapi/lib/api.dart
generated
1
mobile/openapi/lib/api.dart
generated
@@ -284,7 +284,6 @@ part 'model/server_media_types_response_dto.dart';
|
||||
part 'model/server_ping_response.dart';
|
||||
part 'model/server_stats_response_dto.dart';
|
||||
part 'model/server_storage_response_dto.dart';
|
||||
part 'model/server_theme_dto.dart';
|
||||
part 'model/server_version_history_response_dto.dart';
|
||||
part 'model/server_version_response_dto.dart';
|
||||
part 'model/session_create_dto.dart';
|
||||
|
||||
48
mobile/openapi/lib/api/server_api.dart
generated
48
mobile/openapi/lib/api/server_api.dart
generated
@@ -488,54 +488,6 @@ class ServerApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get theme
|
||||
///
|
||||
/// Retrieve the custom CSS, if existent.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getThemeWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/server/theme';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get theme
|
||||
///
|
||||
/// Retrieve the custom CSS, if existent.
|
||||
Future<ServerThemeDto?> getTheme() async {
|
||||
final response = await getThemeWithHttpInfo();
|
||||
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), 'ServerThemeDto',) as ServerThemeDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get version check status
|
||||
///
|
||||
/// Retrieve information about the last time the version check ran.
|
||||
|
||||
2
mobile/openapi/lib/api_client.dart
generated
2
mobile/openapi/lib/api_client.dart
generated
@@ -614,8 +614,6 @@ class ApiClient {
|
||||
return ServerStatsResponseDto.fromJson(value);
|
||||
case 'ServerStorageResponseDto':
|
||||
return ServerStorageResponseDto.fromJson(value);
|
||||
case 'ServerThemeDto':
|
||||
return ServerThemeDto.fromJson(value);
|
||||
case 'ServerVersionHistoryResponseDto':
|
||||
return ServerVersionHistoryResponseDto.fromJson(value);
|
||||
case 'ServerVersionResponseDto':
|
||||
|
||||
100
mobile/openapi/lib/model/server_theme_dto.dart
generated
100
mobile/openapi/lib/model/server_theme_dto.dart
generated
@@ -1,100 +0,0 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class ServerThemeDto {
|
||||
/// Returns a new [ServerThemeDto] instance.
|
||||
ServerThemeDto({
|
||||
required this.customCss,
|
||||
});
|
||||
|
||||
/// Custom CSS for theming
|
||||
String customCss;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ServerThemeDto &&
|
||||
other.customCss == customCss;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(customCss.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ServerThemeDto[customCss=$customCss]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'customCss'] = this.customCss;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ServerThemeDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ServerThemeDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ServerThemeDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ServerThemeDto(
|
||||
customCss: mapValueOfType<String>(json, r'customCss')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ServerThemeDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ServerThemeDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ServerThemeDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ServerThemeDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ServerThemeDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ServerThemeDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ServerThemeDto-objects as value to a dart map
|
||||
static Map<String, List<ServerThemeDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ServerThemeDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ServerThemeDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'customCss',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user