This commit is contained in:
Isaac Wise
2024-02-22 02:51:24 -06:00
parent dbfdb587b6
commit d2e59d48c2
5 changed files with 60 additions and 42 deletions
@@ -44,10 +44,10 @@ export default async function postCollection(
color: collection.color,
parent: collection.parentId
? {
connect: {
id: collection.parentId,
},
}
connect: {
id: collection.parentId,
},
}
: undefined,
},
include: {
@@ -78,7 +78,6 @@ export default async function postCollection(
},
});
createFolder({ filePath: `archives/${newCollection.id}` });
return { response: newCollection, status: 200 };
@@ -97,18 +97,18 @@ export default async function updateUserById(
id: { not: userId },
OR: emailEnabled
? [
{
username: data.username.toLowerCase(),
},
{
email: data.email?.toLowerCase(),
},
]
{
username: data.username.toLowerCase(),
},
{
email: data.email?.toLowerCase(),
},
]
: [
{
username: data.username.toLowerCase(),
},
],
{
username: data.username.toLowerCase(),
},
],
},
});