diff options
Diffstat (limited to 'client/src/app/core/rest/rest-table.ts')
-rw-r--r-- | client/src/app/core/rest/rest-table.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/app/core/rest/rest-table.ts b/client/src/app/core/rest/rest-table.ts index cb5bd0b89..ec5646b5d 100644 --- a/client/src/app/core/rest/rest-table.ts +++ b/client/src/app/core/rest/rest-table.ts | |||
@@ -1,10 +1,11 @@ | |||
1 | import * as debug from 'debug' | 1 | import debug from 'debug' |
2 | import { LazyLoadEvent, SortMeta } from 'primeng/api' | 2 | import { LazyLoadEvent, SortMeta } from 'primeng/api' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { logger } from '@root-helpers/logger' | ||
4 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 5 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
5 | import { RestPagination } from './rest-pagination' | 6 | import { RestPagination } from './rest-pagination' |
6 | 7 | ||
7 | const logger = debug('peertube:tables:RestTable') | 8 | const debugLogger = debug('peertube:tables:RestTable') |
8 | 9 | ||
9 | export abstract class RestTable { | 10 | export abstract class RestTable { |
10 | 11 | ||
@@ -34,7 +35,7 @@ export abstract class RestTable { | |||
34 | try { | 35 | try { |
35 | this.sort = JSON.parse(result) | 36 | this.sort = JSON.parse(result) |
36 | } catch (err) { | 37 | } catch (err) { |
37 | console.error('Cannot load sort of local storage key ' + this.getSortLocalStorageKey(), err) | 38 | logger.error('Cannot load sort of local storage key ' + this.getSortLocalStorageKey(), err) |
38 | } | 39 | } |
39 | } | 40 | } |
40 | } | 41 | } |
@@ -44,7 +45,7 @@ export abstract class RestTable { | |||
44 | } | 45 | } |
45 | 46 | ||
46 | loadLazy (event: LazyLoadEvent) { | 47 | loadLazy (event: LazyLoadEvent) { |
47 | logger('Load lazy %o.', event) | 48 | debugLogger('Load lazy %o.', event) |
48 | 49 | ||
49 | this.sort = { | 50 | this.sort = { |
50 | order: event.sortOrder, | 51 | order: event.sortOrder, |