oauth optimizing
Build LinkLog Development Image / development-image (push) Successful in 22s

This commit is contained in:
Olaf
2026-08-26 08:20:42 +02:00
parent b35249cb86
commit 333aab8e8a
4 changed files with 31 additions and 7 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ mastodonConnectButton.addEventListener('click', async () => {
setStatus('#mastodon-status', `Authorizing with ${instance}...`);
const response = await fetch(`/api/mastodon/oauth/start?instance=${encodeURIComponent(instance)}`, {headers: authHeaders()});
const result = await response.json();
if (!response.ok || !result.authorization_url) throw new Error(result.error || 'Could not start Mastodon authorization.');
if (!response.ok || !result.authorization_url) throw new Error(result.detail || result.error || 'Could not start Mastodon authorization.');
window.location.assign(result.authorization_url);
} catch (error) {
setStatus('#mastodon-status', error.message, true);