feat: request to get a singular image
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user