redundant await and callback
This commit is contained in:
parent
9551acf792
commit
404574bd74
@ -11,9 +11,8 @@ const budouciSpinky: Record<string, NodeJS.Timeout> = {};
|
|||||||
|
|
||||||
const contactSpinkServer = async (akce: string, id: string, nick: string = "", avatar: string | null = "") => {
|
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 ?? "")}`;
|
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}`)
|
return fetch(`https://spinkacek.ga/extapi.php?${options}`)
|
||||||
.then(r => r.text())
|
.then(r => r.text());
|
||||||
.then(text => text);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const syncSpink = async () => {
|
const syncSpink = async () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user