This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user