Skip to content

Commit 6a34c0b

Browse files
committed
When updating the CustomerQuery title specify org id
This prevents cross-tenancy updates
1 parent 87ec51f commit 6a34c0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query.ai-title.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
5959
// If a queryId was provided, update the CustomerQuery record with the title
6060
if (queryId) {
6161
await prisma.customerQuery.update({
62-
where: { id: queryId },
62+
where: { id: queryId, organizationId: project.organizationId },
6363
data: { title },
6464
});
6565
}

0 commit comments

Comments
 (0)