redundant await and callback

This commit is contained in:
Histmy 2021-09-24 19:07:58 +02:00
parent 9551acf792
commit 404574bd74

View File

@ -11,9 +11,8 @@ const budouciSpinky: Record<string, NodeJS.Timeout> = {};
const contactSpinkServer = async (akce: string, id: string, nick: string = "", avatar: string | null = "") => {
const options = `heslo=${process.env.spinkPass}&akce=${akce}&id=${id}&nick=${encodeURIComponent(nick)}&avatar=${encodeURIComponent(avatar ?? "")}`;
return await fetch(`https://spinkacek.ga/extapi.php?${options}`)
.then(r => r.text())
.then(text => text);
return fetch(`https://spinkacek.ga/extapi.php?${options}`)
.then(r => r.text());
};
const syncSpink = async () => {