mirror of
https://github.com/woodchen-ink/Q58Connect.git
synced 2025-07-18 05:51:55 +08:00
test
This commit is contained in:
parent
11bf5318f3
commit
71ad4d48ce
@ -29,13 +29,11 @@ export async function PATCH(
|
||||
home: data.home,
|
||||
logo: data.logo,
|
||||
redirectUri: data.redirectUri,
|
||||
allowedUsers: Array.isArray(data.allowedUsers)
|
||||
? data.allowedUsers
|
||||
: undefined,
|
||||
} 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({
|
||||
where: { id: params.id },
|
||||
data: updateData,
|
||||
|
Loading…
x
Reference in New Issue
Block a user