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