]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/video-list/video-overview.component.ts
Refractor notification service
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-list / video-overview.component.ts
index 2c6054721315d3d66fb3776156187dd1997e3dd8..7ff52b259f04f2c6a754f3a2f72b23e6b7f0a7f3 100644 (file)
@@ -1,6 +1,5 @@
 import { Component, OnInit } from '@angular/core'
-import { AuthService } from '@app/core'
-import { NotificationsService } from 'angular2-notifications'
+import { AuthService, Notifier } from '@app/core'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { VideosOverview } from '@app/shared/overview/videos-overview.model'
 import { OverviewService } from '@app/shared/overview'
@@ -21,7 +20,7 @@ export class VideoOverviewComponent implements OnInit {
 
   constructor (
     private i18n: I18n,
-    private notificationsService: NotificationsService,
+    private notifier: Notifier,
     private authService: AuthService,
     private overviewService: OverviewService
   ) { }
@@ -43,10 +42,7 @@ export class VideoOverviewComponent implements OnInit {
             ) this.notResults = true
           },
 
-          err => {
-            console.log(err)
-            this.notificationsService.error('Error', err.text)
-          }
+          err => this.notifier.error(err.message)
         )
   }