Skip to content

Conversation

billsedison
Copy link
Collaborator

No description provided.

@@ -319,12 +314,11 @@ export class AppealController {
@ApiResponse({ status: 403, description: 'Forbidden.' })
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The challengeId query parameter has been removed from the method signature, but it is still referenced in the log message on line 321. Ensure that the log message accurately reflects the current parameters being used.

@@ -334,16 +328,29 @@ export class AppealController {
// Build where clause for filtering
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable whereClause is declared with any type. Consider specifying a more precise type to improve type safety and maintainability.


const [appeals, totalCount] = await Promise.all([
this.prisma.appealResponse.findMany({
this.prisma.appeal.findMany({
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from this.prisma.appealResponse.findMany to this.prisma.appeal.findMany alters the database query. Ensure that this change is intentional and that appeal is the correct model to query for the desired data.

where: whereClause,
skip,
take: perPage,
include: {
reviewItemComment: {
include: {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inclusion of reviewItemComment and appealResponse in the include clause increases the complexity of the query. Verify that these nested relations are necessary for the operation and consider the performance implications.

@@ -148,8 +148,11 @@ export function mapAppealResponseRequestToDto(
updatedBy: '',
};

// Remove appealId when creating through relationship - Prisma sets it automatically
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a test case to ensure that appealId is correctly omitted when creating through a relationship, as this change relies on Prisma's automatic handling.

@jmgasper jmgasper merged commit a50a9bd into develop Sep 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants