small changes

This commit is contained in:
Daniel
2023-04-25 16:09:46 +03:30
parent 4bfb08a52e
commit e715756cbe
6 changed files with 51 additions and 14 deletions
@@ -8,7 +8,7 @@ import { Collection } from "@prisma/client";
import { existsSync, mkdirSync } from "fs";
export default async function (collection: Collection, userId: number) {
if (!collection)
if (!collection || collection.name.trim() === "")
return {
response: "Please enter a valid collection.",
status: 400,