Skip to content

Commit d23eac2

Browse files
msukkariclaude
andcommitted
fix(web): fix audit target to use userId param and destructure user
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5a9de69 commit d23eac2

File tree

1 file changed

+2
-2
lines changed
  • packages/web/src/app/api/(server)/ee/user

1 file changed

+2
-2
lines changed

packages/web/src/app/api/(server)/ee/user/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const GET = apiHandler(async (request: NextRequest) => {
2222
return serviceErrorResponse(missingQueryParam('userId'));
2323
}
2424

25-
const result = await withAuthV2(async ({ org, role, prisma }) => {
25+
const result = await withAuthV2(async ({ org, role, user, prisma }) => {
2626
return withMinimumOrgRole(role, OrgRole.OWNER, async () => {
2727
try {
2828
const userData = await prisma.user.findUnique({
@@ -48,7 +48,7 @@ export const GET = apiHandler(async (request: NextRequest) => {
4848
type: "user"
4949
},
5050
target: {
51-
id: user.id,
51+
id: userId,
5252
type: "user"
5353
},
5454
orgId: org.id,

0 commit comments

Comments
 (0)