a badly looking image cards thing

This commit is contained in:
2020-10-14 20:50:30 +03:00
committed by Stepan Usatiuk
parent 07ccc56636
commit c20642dba4
17 changed files with 364 additions and 65 deletions

View File

@@ -0,0 +1,14 @@
import { IPhotoReqJSON } from "~../../src/entity/Photo";
import { IPhotosListRespBody } from "~../../src/routes/photos";
import { apiRoot } from "~env";
import { fetchJSONAuth } from "./utils";
export function getPhotoImgPath(photo: IPhotoReqJSON): string {
return `${apiRoot}/photos/showByID/${photo.id}/${photo.accessToken}`;
}
export async function fetchPhotosList(): Promise<IPhotosListRespBody> {
return (fetchJSONAuth("/photos/list", "GET") as unknown) as Promise<
IPhotosListRespBody
>;
}