mirror of
https://github.com/woodchen-ink/Q58Connect.git
synced 2025-07-18 14:01:55 +08:00
test
This commit is contained in:
parent
11bf5318f3
commit
71ad4d48ce
@ -29,13 +29,11 @@ export async function PATCH(
|
|||||||
home: data.home,
|
home: data.home,
|
||||||
logo: data.logo,
|
logo: data.logo,
|
||||||
redirectUri: data.redirectUri,
|
redirectUri: data.redirectUri,
|
||||||
|
allowedUsers: Array.isArray(data.allowedUsers)
|
||||||
|
? data.allowedUsers
|
||||||
|
: undefined,
|
||||||
} satisfies Partial<Prisma.ClientUpdateInput>;
|
} satisfies Partial<Prisma.ClientUpdateInput>;
|
||||||
|
|
||||||
// 单独处理 allowedUsers 字段
|
|
||||||
if (Array.isArray(data.allowedUsers)) {
|
|
||||||
await prisma.$executeRaw`UPDATE clients SET "allowedUsers" = ${data.allowedUsers}::text[] WHERE id = ${params.id}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
const updatedClient = await prisma.client.update({
|
const updatedClient = await prisma.client.update({
|
||||||
where: { id: params.id },
|
where: { id: params.id },
|
||||||
data: updateData,
|
data: updateData,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user