mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 09:36:08 +00:00
Restrict guest CSV comment export in UI and fix lint/typecheck cleanup in comment APIs
This commit is contained in:
@@ -243,7 +243,9 @@ export async function PATCH(request: NextRequest, { params }: RouteParams) {
|
||||
},
|
||||
});
|
||||
|
||||
const { guestIdentityId: _updatedGuestIdentityId, ...updatedCommentData } = updatedComment;
|
||||
const updatedCommentData = Object.fromEntries(
|
||||
Object.entries(updatedComment).filter(([key]) => key !== 'guestIdentityId')
|
||||
);
|
||||
const response = successResponse({
|
||||
...updatedCommentData,
|
||||
canEdit: canEditOwnContent,
|
||||
@@ -255,7 +257,9 @@ export async function PATCH(request: NextRequest, { params }: RouteParams) {
|
||||
&& !reply.authorId
|
||||
&& !!reply.guestIdentityId
|
||||
&& reply.guestIdentityId === guestIdentityId;
|
||||
const { guestIdentityId: _replyGuestIdentityId, ...replyData } = reply;
|
||||
const replyData = Object.fromEntries(
|
||||
Object.entries(reply).filter(([key]) => key !== 'guestIdentityId')
|
||||
);
|
||||
return {
|
||||
...replyData,
|
||||
canEdit: canEditReply,
|
||||
|
||||
Reference in New Issue
Block a user