update console messages
This commit is contained in:
parent
9afc7b1298
commit
e5b701aa55
@ -31,13 +31,14 @@ function unshortenUrl(linkUrl) {
|
||||
fetch("http://localhost:8000/?url=" + linkUrl)
|
||||
.then(res => {
|
||||
if (!res.ok) {
|
||||
console.log("error fetching result");
|
||||
console.log("Couldn't unshorten URL: " + res.statusText);
|
||||
}
|
||||
return res.json();
|
||||
})
|
||||
.then(unshortenedUrl => {
|
||||
console.log("unshortened: " + unshortenedUrl)
|
||||
navigator.clipboard.writeText(unshortenedUrl)
|
||||
.catch(err => console.error("couldn't copy to clipboard", err));
|
||||
});
|
||||
.catch(err => console.error("Couldn't copy to clipboard: ", err));
|
||||
})
|
||||
.catch(err => {console.error("Couldn't contact server:", err)});
|
||||
}
|
Loading…
Reference in New Issue
Block a user