1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-17 03:47:45 +02:00

refactor: image path building (#9823)

This commit is contained in:
Jason Rasmussen
2024-05-28 13:15:02 -04:00
committed by GitHub
parent d400925aeb
commit db4c66094c
2 changed files with 18 additions and 16 deletions

View File

@ -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`;