if (!this.products.find((item) => res.code === item.code)) {
this.products.push(res);
}
async function f() {
let payload = {};
let schedule = await parser();
payload.message = schedule[0].date;
return payload;
}
// использование
f().then((payload) => {
console.log(payload);
});