diff --git a/frontend/src/app/quotes/quotes.component.html b/frontend/src/app/quotes/quotes.component.html index 071e053..7523cc7 100644 --- a/frontend/src/app/quotes/quotes.component.html +++ b/frontend/src/app/quotes/quotes.component.html @@ -13,7 +13,7 @@ + matSort matSortActive="id" matSortDirection="desc" matSortDisableClear> diff --git a/frontend/src/app/quotes/quotes.component.ts b/frontend/src/app/quotes/quotes.component.ts index f607fb5..0f1db2f 100644 --- a/frontend/src/app/quotes/quotes.component.ts +++ b/frontend/src/app/quotes/quotes.component.ts @@ -53,7 +53,7 @@ export class QuotesComponent implements OnInit, AfterViewInit { ngOnInit() { this.dataSource = new QuotesDataSource(this.quotesService); - this.dataSource.loadQuotes('', 'date', 'desc', 0, 10); + this.dataSource.loadQuotes('', 'id', 'desc', 0, 10); } ngAfterViewInit() { diff --git a/frontend/src/app/services/quotes.service.ts b/frontend/src/app/services/quotes.service.ts index 339d697..07252b4 100644 --- a/frontend/src/app/services/quotes.service.ts +++ b/frontend/src/app/services/quotes.service.ts @@ -20,7 +20,7 @@ export class QuotesService { constructor(private http: HttpClient) { } findQuotes( - filter = '', sortBy = 'date', sortOrder = 'desc', + filter = '', sortBy = 'id', sortOrder = 'desc', pageNumber = 0, pageSize = 10): Observable { return this.http.get('/quotes/api/quotes', {