Уязвимость фиксации сессии в ASP.NET

Может быть, этот небольшой пример кода для скриптов поможет.

private getAccount(id: Id) : Account {
    let account = Account.empty();
    this.repository.get(id)
        .then(res => account = res)
        .catch(e => Notices.results(e));
    return account;
}

Здесь repository.get(id) возвращает Promise<Account>. Я назначаю его переменной account в инструкции then.

0
задан Panagiotis Kanavos 20 March 2019 в 13:29
поделиться