From f8b2c1b4f509c037b9650cca2c5befd21f056df3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 19 Dec 2018 16:04:34 +0100 Subject: Refractor notification service Shorter name and use primeng component --- .../my-account-danger-zone/my-account-danger-zone.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/app/+my-account/my-account-settings/my-account-danger-zone') diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts index 63a121f64..3f79efe20 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts @@ -1,5 +1,5 @@ import { Component, Input } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { AuthService, ConfirmService, RedirectService } from '../../../core' import { UserService } from '../../../shared' import { I18n } from '@ngx-translate/i18n-polyfill' @@ -15,7 +15,7 @@ export class MyAccountDangerZoneComponent { constructor ( private authService: AuthService, - private notificationsService: NotificationsService, + private notifier: Notifier, private userService: UserService, private confirmService: ConfirmService, private redirectService: RedirectService, @@ -34,13 +34,13 @@ export class MyAccountDangerZoneComponent { this.userService.deleteMe().subscribe( () => { - this.notificationsService.success(this.i18n('Success'), this.i18n('Your account is deleted.')) + this.notifier.success(this.i18n('Your account is deleted.')) this.authService.logout() this.redirectService.redirectToHomepage() }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } -- cgit v1.2.3