Restrict guest CSV comment export in UI and fix lint/typecheck cleanup in comment APIs

This commit is contained in:
Yusuf İpek
2026-02-24 15:03:42 +03:00
parent 449433a08a
commit 4083651025
4 changed files with 22 additions and 16 deletions
+6 -2
View File
@@ -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,