Skip to content

Commit

Permalink
fix(server) solving function template sorting problems (labring#1568)
Browse files Browse the repository at this point in the history
  • Loading branch information
HUAHUAI23 authored Oct 9, 2023
1 parent fc73e6f commit 04f8475
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/src/function-template/function-template.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ export class FunctionTemplateService {
{
$sort: {
star: asc === 0 ? 1 : -1,
_id: 1,
},
},
{ $skip: (page - 1) * pageSize },
Expand Down Expand Up @@ -1175,6 +1176,7 @@ export class FunctionTemplateService {
{
$sort: {
star: asc === 0 ? 1 : -1,
_id: 1,
},
},
{ $skip: (page - 1) * pageSize },
Expand Down Expand Up @@ -1339,6 +1341,7 @@ export class FunctionTemplateService {
{
$sort: {
star: asc === 0 ? 1 : -1,
_id: 1,
},
},
{ $skip: (page - 1) * pageSize },
Expand Down Expand Up @@ -1504,6 +1507,7 @@ export class FunctionTemplateService {
{
$sort: {
'functionTemplate.star': asc === 0 ? 1 : -1,
'functionTemplate._id': 1,
},
},
{ $skip: (page - 1) * pageSize },
Expand Down

0 comments on commit 04f8475

Please sign in to comment.