fully added support for sub-collections

This commit is contained in:
daniel31x13
2024-02-06 16:46:05 -05:00
parent 392d98f090
commit 3600f6398a
3 changed files with 47 additions and 42 deletions
@@ -48,7 +48,10 @@ export default async function postCollection(
const checkIfCollectionExists = findCollection?.collections[0];
if (checkIfCollectionExists)
return { response: "Collection already exists.", status: 400 };
return {
response: "Oops! There's already a Collection with that name.",
status: 400,
};
const newCollection = await prisma.collection.create({
data: {