logininfo.transformers.ts 476 Bytes
Newer Older
1
2
3
4
5
import { ILoginInfo, ILoginInfoToken } from './logininfo.types';

export function deimmutifyLoginInfo(state: ILoginInfo): ILoginInfoToken[] {
    let fetchedLoginInfoTokens = new Array();
    state.forEach(loginInfoToken => {
6
        fetchedLoginInfoTokens.push(<ILoginInfoToken>{auth_token: loginInfoToken.auth_token, auth_role: loginInfoToken.auth_role, cu_name: loginInfoToken.cu_name, xcsrftoken: loginInfoToken.xcsrftoken});
7
8
9
    });
    return fetchedLoginInfoTokens;
};