Commit a2f83dd0 authored by Laurent's avatar Laurent

Symphony: fix account link detection

parent bf888b94
declare var unescape: any;
import {PortalAdapter} from './adapter';
import * as cheerio from 'cheerio';
import {Account, Loan} from '../../models';
......@@ -31,8 +32,6 @@ export class Symphony extends PortalAdapter {
if ($('input[name="userid"]').length > 0)
return Promise.reject(new WrongLoginPassword());
account.beConnected();
return Promise.resolve();
})
}
......@@ -45,7 +44,7 @@ export class Symphony extends PortalAdapter {
.request(account, { url: account.getUrl() })
.then( (response) => {
let $ = cheerio.load(response.content.toString());
let account_link = $('a[href*="?screen=MyAccount.html"]');
let account_link = $('a[href*="screen=MyAccount.html"]');
return this
.request(account, { url: base_url + account_link.attr('href') })
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment