File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
plugins/qeta-backend/src/database Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -2580,11 +2580,9 @@ export class DatabaseQetaStore implements QetaStore {
2580
2580
postId : number ,
2581
2581
commentsFilter ?: PermissionCriteria < QetaFilters > ,
2582
2582
) : Promise < RawCommentEntity [ ] > {
2583
- const query = this . db < RawCommentEntity > ( 'comments' ) . where (
2584
- 'comments.postId' ,
2585
- '=' ,
2586
- postId ,
2587
- ) ;
2583
+ const query = this . db < RawCommentEntity > ( 'comments' )
2584
+ . where ( 'comments.postId' , '=' , postId )
2585
+ . orderBy ( 'created' ) ;
2588
2586
if ( commentsFilter ) {
2589
2587
parseFilter ( commentsFilter , query , this . db , 'comments' ) ;
2590
2588
}
@@ -2595,11 +2593,9 @@ export class DatabaseQetaStore implements QetaStore {
2595
2593
answerId : number ,
2596
2594
commentsFilter ?: PermissionCriteria < QetaFilters > ,
2597
2595
) : Promise < RawCommentEntity [ ] > {
2598
- const query = this . db < RawCommentEntity > ( 'comments' ) . where (
2599
- 'comments.answerId' ,
2600
- '=' ,
2601
- answerId ,
2602
- ) ;
2596
+ const query = this . db < RawCommentEntity > ( 'comments' )
2597
+ . where ( 'comments.answerId' , '=' , answerId )
2598
+ . orderBy ( 'created' ) ;
2603
2599
if ( commentsFilter ) {
2604
2600
parseFilter ( commentsFilter , query , this . db , 'comments' ) ;
2605
2601
}
You can’t perform that action at this time.
0 commit comments