Skip to content

Commit ddbba9f

Browse files
committed
Change permission acction on POST snapshot endpoint
1 parent fda765e commit ddbba9f

File tree

1 file changed

+1
-1
lines changed
  • app/api/conversations/[conversationId]/snapshots

1 file changed

+1
-1
lines changed

app/api/conversations/[conversationId]/snapshots/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export async function POST(request: NextRequest, { params }: { params: Promise<{
2525
return NextResponse.json({ error: 'Conversation not found' }, { status: 404 });
2626
}
2727

28-
if (userAbility.cannot(PermissionAction.create, subject('Conversation', conversation))) {
28+
if (userAbility.cannot(PermissionAction.update, subject('Conversation', conversation))) {
2929
return NextResponse.json({ error: 'Insufficient permissions' }, { status: 403 });
3030
}
3131

0 commit comments

Comments
 (0)