-
Notifications
You must be signed in to change notification settings - Fork 79
Conversation
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Codecov Report
@@ Coverage Diff @@
## main #922 +/- ##
=========================================
Coverage 77.50% 77.51%
Complexity 1978 1978
=========================================
Files 1192 1192
Lines 16402 16406 +4
Branches 1490 1490
=========================================
+ Hits 12713 12717 +4
Misses 3217 3217
Partials 472 472
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
36d4178
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
@@ -35,10 +35,10 @@ export class ExecutionQuery { | |||
public page: number | |||
|
|||
@ApiProperty() | |||
@IsBooleanString() |
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.
Why remove the IsBooleanString
validation? Is it not needed?
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.
Because its not mandatory anymore!
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.
Done
private getPageSize(actualPageSize: number): number { | ||
return Math.min(actualPageSize, this.maxPageSize) | ||
} | ||
|
||
private isLast(page: number, totalPages: number): boolean { | ||
return totalPages > 0 ? | ||
page === (totalPages -1) : | ||
true | ||
} |
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.
Wouldn't be better to put this in a utils file? I think we might reuse this elsewhere
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.
I usually try to avoid util files. So, I changed the paginated response interface, so the isLast method could be in it.
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
No description provided.