Skip to content

Commit

Permalink
Ordena comentários por data
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardosnt committed Aug 17, 2020
1 parent dc3bbac commit f201b8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export class TweetDetalheComponent implements OnInit {

const seletor = new ComentarioSeletor();
seletor.idTweet = id;
seletor.orderField = 'data';
seletor.orderType = 'desc';

// TODO: usar DTO
this.api.comentario().pesquisar(seletor)
.subscribe(comentarios => this.comentarios = comentarios);
});
Expand Down
4 changes: 4 additions & 0 deletions src/app/shared/models/seletor/comentario.seletor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ export class ComentarioSeletor {
data: Date;
idTweet: number;
idUsuario: number;
orderField: string;
orderType: string;
pagina: number;
limite: number;
}

0 comments on commit f201b8e

Please sign in to comment.