SHARE
TWEET
Untitled
a guest
Dec 22nd, 2017
18
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- login(credentials: Credentials): Observable<any> {
- const result = this.apiAuthService.login(credentials)
- .map(response => {
- this.username = credentials.username
- this.token = response['id']
- this.userId = response['userId']
- }).concatMap(response =>{
- return this.getUserRoleMapping(this.userId).map(res =>{
- return res
- })
- }).concatMap((res)=>{
- console.log(res)
- console.log('return the getRealRol',this.getRealRol(res[0].roleId))
- return this.getRealRol(res[0].roleId).map(info =>{
- return info
- })
- }).concatMap((info)=>{
- this.userRol = info.name
- this.setStorageToken(this.userId, this.token, this.userRol)
- })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
