fix update collection bug
This commit is contained in:
parent
7d9cc1f1f0
commit
f7a53d53e2
|
@ -51,17 +51,18 @@ export default async function updateCollection(
|
|||
where: {
|
||||
id: collectionId,
|
||||
},
|
||||
|
||||
data: {
|
||||
name: data.name.trim(),
|
||||
description: data.description,
|
||||
color: data.color,
|
||||
isPublic: data.isPublic,
|
||||
parent: {
|
||||
parent: data.parentId
|
||||
? {
|
||||
connect: {
|
||||
id: data.parentId || undefined,
|
||||
},
|
||||
id: data.parentId,
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
members: {
|
||||
create: data.members.map((e) => ({
|
||||
user: { connect: { id: e.user.id || e.userId } },
|
||||
|
|
Ŝarĝante…
Reference in New Issue