spinkacek.ga 🍡 spinkacek.deadfish.cz

This commit is contained in:
det-fys 2022-10-26 00:20:46 +02:00 committed by GitHub
parent 159bd31323
commit ac0824592b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,12 +12,12 @@ const autoSpinky: SRecord<[boolean, TextBasedChannel]> = {};
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 fetch(`https://spinkacek.ga/extapi.php?${options}`) return fetch(`https://spinkacek.deadfish.cz/extapi.php?${options}`)
.then(r => r.text()); .then(r => r.text());
}; };
const syncSpink = () => { const syncSpink = () => {
fetch("https://spinkacek.ga/api/spinkacky") fetch("https://spinkacek.deadfish.cz/api/spinkacky")
.then(r => r.json() as Promise<{ spinkacky: SRecord<Spinkackar>; }>) .then(r => r.json() as Promise<{ spinkacky: SRecord<Spinkackar>; }>)
.then(d => { .then(d => {
const data = d.spinkacky; const data = d.spinkacky;