mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix: api repositories using stale endpoint (#28667)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
55947cb227
commit
0d6cce4a5b
3 changed files with 12 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ import 'package:logging/logging.dart';
|
|||
import 'package:openapi/api.dart';
|
||||
|
||||
class ApiService {
|
||||
late ApiClient _apiClient;
|
||||
final ApiClient _apiClient = ApiClient(basePath: '');
|
||||
|
||||
late UsersApi usersApi;
|
||||
late AuthenticationApi authenticationApi;
|
||||
|
|
@ -54,7 +54,7 @@ class ApiService {
|
|||
}
|
||||
|
||||
setEndpoint(String endpoint) {
|
||||
_apiClient = ApiClient(basePath: endpoint);
|
||||
_apiClient.basePath = endpoint;
|
||||
_apiClient.client = NetworkRepository.client;
|
||||
usersApi = UsersApi(_apiClient);
|
||||
authenticationApi = AuthenticationApi(_apiClient);
|
||||
|
|
|
|||
2
mobile/openapi/lib/api_client.dart
generated
2
mobile/openapi/lib/api_client.dart
generated
|
|
@ -13,7 +13,7 @@ part of openapi.api;
|
|||
class ApiClient {
|
||||
ApiClient({this.basePath = '/api', this.authentication,});
|
||||
|
||||
final String basePath;
|
||||
String basePath;
|
||||
final Authentication? authentication;
|
||||
|
||||
var _client = Client();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,12 @@
|
|||
@@ -13,7 +13,7 @@
|
||||
class ApiClient {
|
||||
ApiClient({this.basePath = '/api', this.authentication,});
|
||||
|
||||
- final String basePath;
|
||||
+ String basePath;
|
||||
final Authentication? authentication;
|
||||
|
||||
var _client = Client();
|
||||
@@ -143,19 +143,19 @@
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue