You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-24 04:46:50 +02:00
fix(server) added TagResponseDto for TagController (#1065)
* fix(server) added TagResponseDto for TagController * Added userId to DTO
This commit is contained in:
28
mobile/openapi/lib/api/tag_api.dart
generated
28
mobile/openapi/lib/api/tag_api.dart
generated
@ -48,7 +48,7 @@ class TagApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [CreateTagDto] createTagDto (required):
|
||||
Future<TagEntity?> create(CreateTagDto createTagDto,) async {
|
||||
Future<TagResponseDto?> create(CreateTagDto createTagDto,) async {
|
||||
final response = await createWithHttpInfo(createTagDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
@ -57,7 +57,7 @@ class TagApi {
|
||||
// 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), 'TagEntity',) as TagEntity;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
@ -96,19 +96,11 @@ class TagApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<TagEntity?> delete(String id,) async {
|
||||
Future<void> delete(String id,) async {
|
||||
final response = await deleteWithHttpInfo(id,);
|
||||
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), 'TagEntity',) as TagEntity;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /tag' operation and returns the [Response].
|
||||
@ -137,7 +129,7 @@ class TagApi {
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<TagEntity>?> findAll() async {
|
||||
Future<List<TagResponseDto>?> findAll() async {
|
||||
final response = await findAllWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
@ -147,8 +139,8 @@ class TagApi {
|
||||
// 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<TagEntity>') as List)
|
||||
.cast<TagEntity>()
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<TagResponseDto>') as List)
|
||||
.cast<TagResponseDto>()
|
||||
.toList();
|
||||
|
||||
}
|
||||
@ -188,7 +180,7 @@ class TagApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<TagEntity?> findOne(String id,) async {
|
||||
Future<TagResponseDto?> findOne(String id,) async {
|
||||
final response = await findOneWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
@ -197,7 +189,7 @@ class TagApi {
|
||||
// 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), 'TagEntity',) as TagEntity;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
@ -240,7 +232,7 @@ class TagApi {
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UpdateTagDto] updateTagDto (required):
|
||||
Future<Object?> update(String id, UpdateTagDto updateTagDto,) async {
|
||||
Future<TagResponseDto?> update(String id, UpdateTagDto updateTagDto,) async {
|
||||
final response = await updateWithHttpInfo(id, updateTagDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
@ -249,7 +241,7 @@ class TagApi {
|
||||
// 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), 'TagResponseDto',) as TagResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user