mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Remove VITE_SERVER_ENDPOINT dependency (#428)
* Move backend api to its own instance * Remove external fetch hook * Added endpoint for album * Added endpoint for admin page * Make request directly to immich-server * Refactor unsued code
This commit is contained in:
parent
cf2b9eddfa
commit
b68358766b
23 changed files with 152 additions and 66 deletions
|
|
@ -16,7 +16,7 @@ class ImmichApi {
|
|||
public authenticationApi: AuthenticationApi;
|
||||
public deviceInfoApi: DeviceInfoApi;
|
||||
public serverInfoApi: ServerInfoApi;
|
||||
private config = new Configuration({ basePath: serverEndpoint });
|
||||
private config = new Configuration({ basePath: '/api' });
|
||||
|
||||
constructor() {
|
||||
this.userApi = new UserApi(this.config);
|
||||
|
|
@ -34,6 +34,12 @@ class ImmichApi {
|
|||
public removeAccessToken() {
|
||||
this.config.accessToken = undefined;
|
||||
}
|
||||
|
||||
public setBaseUrl(baseUrl: string) {
|
||||
this.config.basePath = baseUrl;
|
||||
}
|
||||
}
|
||||
|
||||
export const api = new ImmichApi();
|
||||
export const serverApi = new ImmichApi();
|
||||
serverApi.setBaseUrl('http://immich-server:3001');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue