import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { Router } from '@angular/router'
-import { NotificationsService } from 'angular2-notifications'
+import { Notifier } from '@app/core/notification/notifier.service'
import { OAuthClientLocal, User as UserServerModel, UserRefreshToken } from '../../../../../shared'
import { User } from '../../../../../shared/models/users'
import { UserLogin } from '../../../../../shared/models/users/user-login.model'
import { environment } from '../../../environments/environment'
-import { RestExtractor } from '../../shared/rest'
+import { RestExtractor } from '../../shared/rest/rest-extractor.service'
import { AuthStatus } from './auth-status.model'
import { AuthUser } from './auth-user.model'
import { objectToUrlEncoded } from '@app/shared/misc/utils'
constructor (
private http: HttpClient,
- private notificationsService: NotificationsService,
+ private notifier: Notifier,
private hotkeysService: HotkeysService,
private restExtractor: RestExtractor,
private router: Router,
)
}
- // We put a bigger timeout
- // This is an important message
- this.notificationsService.error(this.i18n('Error'), errorMessage, { timeOut: 7000 })
+ // We put a bigger timeout: this is an important message
+ this.notifier.error(errorMessage, this.i18n('Error'), 7000)
}
)
}
response_type: 'code',
grant_type: 'password',
scope: 'upload',
- username,
+ username: username.toLowerCase(),
password
}