feat: request to get a singular image

This commit is contained in:
2025-04-22 21:01:06 +01:00
parent e6c027aca7
commit f1500837e0
2 changed files with 44 additions and 0 deletions

View File

@@ -160,6 +160,15 @@ export const getUserImages = async (): Promise<UserImage[]> => {
return parse(getUserImagesResponseValidator, res);
};
export const getImage = async (imageId: string): Promise<UserImage> => {
const request = getBaseAuthorizedRequest({
path: `image-properties/${imageId}`,
});
const res = await fetch(request).then((res) => res.json());
return parse(dataTypeValidator, res);
};
export const postLogin = async (email: string): Promise<void> => {
const request = getBaseRequest({
path: "login",