logininfo.transformers.ts 597 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 7
        fetchedLoginInfoTokens.push(<ILoginInfoToken>{auth_token: loginInfoToken.auth_token, auth_role: loginInfoToken.auth_role, cu_name: loginInfoToken.cu_name,
                                                      minedu_username: loginInfoToken.minedu_username, minedu_userpassword: loginInfoToken.minedu_userpassword});
8 9 10
    });
    return fetchedLoginInfoTokens;
};