mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(server): require local admin account (#1070)
This commit is contained in:
parent
3bb103c6b6
commit
14889e7d85
14 changed files with 119 additions and 38 deletions
16
mobile/openapi/lib/api/user_api.dart
generated
16
mobile/openapi/lib/api/user_api.dart
generated
|
|
@ -358,7 +358,10 @@ class UserApi {
|
|||
}
|
||||
|
||||
/// Performs an HTTP 'GET /user/count' operation and returns the [Response].
|
||||
Future<Response> getUserCountWithHttpInfo() async {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [bool] admin:
|
||||
Future<Response> getUserCountWithHttpInfo({ bool? admin, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/user/count';
|
||||
|
||||
|
|
@ -369,6 +372,10 @@ class UserApi {
|
|||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (admin != null) {
|
||||
queryParams.addAll(_queryParams('', 'admin', admin));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
|
|
@ -383,8 +390,11 @@ class UserApi {
|
|||
);
|
||||
}
|
||||
|
||||
Future<UserCountResponseDto?> getUserCount() async {
|
||||
final response = await getUserCountWithHttpInfo();
|
||||
/// 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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue