feat: initial cat page

This commit is contained in:
Alexander Daichendt 2022-08-03 20:23:19 +02:00
parent 5b43a36d31
commit 8d02623c8c
7 changed files with 135 additions and 9 deletions

View file

@ -6,15 +6,19 @@
function beamKitty() {
importing = true;
fetch(`https://cats.daichendt.one/import?key=${kittyLink}`, {
fetch(`https://cats.daichendt.one/import?url=${kittyLink}&optimize=true`, {
method: 'PUT',
headers: { 'X-Custom-Auth-Key': import.meta.env.VITE_CATAPI_PASSWD },
}).then((result) => {
importing = false;
if (result.status === 200) {
kittyLink = '';
importing = false;
showSuccess = true;
setTimeout(() => (showSuccess = false), 5000);
} else {
// display error
console.log(result);
}
});
}