bug fix + use id instead of username for lookup

This commit is contained in:
Daniel
2023-07-19 12:14:52 -04:00
parent 01a8579158
commit 35bece5f49
13 changed files with 24 additions and 29 deletions
@@ -43,7 +43,7 @@ export default async function updateCollection(
isPublic: collection.isPublic,
members: {
create: collection.members.map((e) => ({
user: { connect: { username: e.user.username.toLowerCase() } },
user: { connect: { id: e.user.id } },
canCreate: e.canCreate,
canUpdate: e.canUpdate,
canDelete: e.canDelete,