1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-18 03:57:43 +02:00

chore(server): remove user count endpoint (#4724)

* chore: remove unused endpoint

* chore: open api
This commit is contained in:
Jason Rasmussen
2023-10-30 15:29:18 -04:00
committed by GitHub
parent 2f87463170
commit 8dcd159bd6
21 changed files with 3 additions and 613 deletions

View File

@ -357,57 +357,6 @@ class UserApi {
return null;
}
/// Performs an HTTP 'GET /user/count' operation and returns the [Response].
/// Parameters:
///
/// * [bool] admin:
Future<Response> getUserCountWithHttpInfo({ bool? admin, }) async {
// ignore: prefer_const_declarations
final path = r'/user/count';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (admin != null) {
queryParams.addAll(_queryParams('', 'admin', admin));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [bool] admin:
Future<UserCountResponseDto?> getUserCount({ bool? admin, }) async {
final response = await getUserCountWithHttpInfo( admin: admin, );
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), 'UserCountResponseDto',) as UserCountResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /user/{id}/restore' operation and returns the [Response].
/// Parameters:
///