mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: image path building (#9823)
This commit is contained in:
parent
d400925aeb
commit
db4c66094c
2 changed files with 18 additions and 16 deletions
|
|
@ -23,3 +23,13 @@ export const setApiKey = (apiKey: string) => {
|
|||
defaults.headers = defaults.headers || {};
|
||||
defaults.headers['x-api-key'] = apiKey;
|
||||
};
|
||||
|
||||
export const getAssetOriginalPath = (id: string) => `/asset/file/${id}`;
|
||||
|
||||
export const getAssetThumbnailPath = (id: string) => `/asset/thumbnail/${id}`;
|
||||
|
||||
export const getUserProfileImagePath = (userId: string) =>
|
||||
`/users/${userId}/profile-image`;
|
||||
|
||||
export const getPeopleThumbnailPath = (personId: string) =>
|
||||
`/people/${personId}/thumbnail`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue