feat(cards): adjusting for backend data types
This commit is contained in:
@@ -82,9 +82,9 @@ const eventDataType = object({
|
||||
const dataTypeValidator = variant("type", [locationDataType, eventDataType]);
|
||||
const getUserImagesResponseValidator = array(dataTypeValidator);
|
||||
|
||||
export const getUserImages = async (): Promise<
|
||||
InferOutput<typeof getUserImagesResponseValidator>
|
||||
> => {
|
||||
export type UserImage = InferOutput<typeof dataTypeValidator>;
|
||||
|
||||
export const getUserImages = async (): Promise<UserImage[]> => {
|
||||
const request = getBaseRequest({ path: "image" });
|
||||
|
||||
const res = await fetch(request).then((res) => res.json());
|
||||
|
||||
Reference in New Issue
Block a user