Archived
fix direction
This commit is contained in:
1 file changed
+3
-3
@@ -33,11 +33,11 @@ export class IssuesController {
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll(@Param('direction') direction: string) {
|
||||
findAll(@Param('direction') direction?: string) {
|
||||
return this.issuesService
|
||||
.findAll(
|
||||
direction.toLowerCase() === 'desc' ||
|
||||
direction.toLowerCase() === 'descending',
|
||||
direction?.toLowerCase() === 'desc' ||
|
||||
direction?.toLowerCase() === 'descending',
|
||||
)
|
||||
.then((r) => r.map((i) => i.toDto()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user