You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-09 23:17:29 +02:00
refactor(server): immich file responses (#5641)
* refactor(server): immich file response * chore: open api * chore: tests * chore: fix logger import --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
2
mobile/openapi/doc/AssetApi.md
generated
2
mobile/openapi/doc/AssetApi.md
generated
@@ -725,7 +725,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: image/jpeg, image/webp
|
||||
- **Accept**: application/octet-stream
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
2
mobile/openapi/doc/PersonApi.md
generated
2
mobile/openapi/doc/PersonApi.md
generated
@@ -343,7 +343,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: image/jpeg
|
||||
- **Accept**: application/octet-stream
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
6
mobile/openapi/doc/UserApi.md
generated
6
mobile/openapi/doc/UserApi.md
generated
@@ -343,7 +343,7 @@ This endpoint does not need any parameter.
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getProfileImage**
|
||||
> Object getProfileImage(id)
|
||||
> MultipartFile getProfileImage(id)
|
||||
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**Object**](Object.md)
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -393,7 +393,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Accept**: application/octet-stream
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
4
mobile/openapi/lib/api/user_api.dart
generated
4
mobile/openapi/lib/api/user_api.dart
generated
@@ -327,7 +327,7 @@ class UserApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Object?> getProfileImage(String id,) async {
|
||||
Future<MultipartFile?> getProfileImage(String id,) async {
|
||||
final response = await getProfileImageWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
@@ -336,7 +336,7 @@ class UserApi {
|
||||
// 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), 'MultipartFile',) as MultipartFile;
|
||||
|
||||
}
|
||||
return null;
|
||||
|
2
mobile/openapi/test/user_api_test.dart
generated
2
mobile/openapi/test/user_api_test.dart
generated
@@ -47,7 +47,7 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<Object> getProfileImage(String id) async
|
||||
//Future<MultipartFile> getProfileImage(String id) async
|
||||
test('test getProfileImage', () async {
|
||||
// TODO
|
||||
});
|
||||
|
Reference in New Issue
Block a user