2024-08-16 11:35:04 -05:00
|
|
|
const getPublicCollectionData = async (collectionId: number) => {
|
2023-11-15 12:12:06 -06:00
|
|
|
const res = await fetch("/api/v1/public/collections/" + collectionId);
|
2023-05-29 14:40:23 -05:00
|
|
|
|
2024-07-22 17:50:24 -05:00
|
|
|
if (res.status === 400)
|
|
|
|
return { response: "Collection not found.", status: 400 };
|
2024-07-22 17:39:38 -05:00
|
|
|
|
2023-05-29 14:40:23 -05:00
|
|
|
const data = await res.json();
|
|
|
|
|
|
|
|
return data;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default getPublicCollectionData;
|