-
Notifications
You must be signed in to change notification settings - Fork 8
Fix issue #44 #45 #46 #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -319,12 +314,11 @@ export class AppealController { | |||
@ApiResponse({ status: 403, description: 'Forbidden.' }) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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({ |
There was a problem hiding this comment.
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: { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
No description provided.