Skip to content

Commit

Permalink
update sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwitr0 committed May 4, 2024
1 parent 8165442 commit 203f5e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/movie/dto/v1.4/movie-request.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ export class MovieRequestDtoV1_4 implements IRequestModel {
public model2Sort(): { [key: string]: SortOrder } {
const sort = new SortBuilder().build(this.sortField, this.sortType);

return Object.keys(sort)?.length ? { ...sort, _id: -1 } : { 'votes.kp': -1, _id: -1 };
return Object.keys(sort)?.length ? { ...sort, _id: -1 } : { _id: -1 };
}

public model2Pagination() {
Expand Down
2 changes: 1 addition & 1 deletion src/person/dto/v1.4/person-request.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export class PersonRequestDtoV1_4 implements IRequestModel {
public model2Sort(): { [key: string]: SortOrder } {
const sort = new SortBuilder().build(this.sortField, this.sortType);

return Object.keys(sort)?.length ? { ...sort, _id: -1 } : { id: -1, _id: -1 };
return Object.keys(sort)?.length ? { ...sort, _id: -1 } : { _id: -1 };
}

public model2Pagination() {
Expand Down

0 comments on commit 203f5e2

Please sign in to comment.