diff --git a/package.json b/package.json index 3fe53c4..d88d3f1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hyperspace", "productName": "Hyperspace", - "version": "1.0.0", + "version": "1.0.1", "description": "A beautiful, fluffy client for the fediverse", "author": "Marquis Kurt ", "repository": "https://github.com/hyperspacedev/hyperspace.git", diff --git a/public/config.json b/public/config.json index d6b2b07..b283be9 100644 --- a/public/config.json +++ b/public/config.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.1", "location": "https://hyperspaceapp.herokuapp.com", "branding": { "name": "Hyperspace", diff --git a/src/pages/Welcome.tsx b/src/pages/Welcome.tsx index 2dd15aa..acf6d76 100644 --- a/src/pages/Welcome.tsx +++ b/src/pages/Welcome.tsx @@ -1,4 +1,4 @@ -import React, { Component, ChangeEvent } from "react"; +import React, { Component } from "react"; import { withStyles, Paper, @@ -26,7 +26,8 @@ import { SaveClientSession } from "../types/SessionData"; import { createHyperspaceApp, getRedirectAddress, - inDisallowedDomains + inDisallowedDomains, + instancesBearerKey } from "../utilities/login"; import { parseUrl } from "query-string"; import { getConfig } from "../utilities/settings"; @@ -354,9 +355,13 @@ class WelcomePage extends Component { } else { axios .get( - "https://" + - baseUrl + - "/api/v1/timelines/public" + "https://instances.social/api/1.0/instances/show?name=" + + baseUrl, + { + headers: { + Authorization: `Bearer ${instancesBearerKey}` + } + } ) .catch((err: Error) => { let userInputError = true; diff --git a/src/utilities/login.tsx b/src/utilities/login.tsx index 0e36d21..9b0a4bb 100644 --- a/src/utilities/login.tsx +++ b/src/utilities/login.tsx @@ -1,5 +1,8 @@ import Mastodon from "megalodon"; +export const instancesBearerKey = + "QBEULaOyF04OKjHsHktx5reOqDUklWMSWfUiKRdcen7iLDjta8kL2ZEgozAlBScizR0LKSMcxg2su9f3VLdJt5dZyfWkSXEPlxHBUlPzBF4Ju9lAiOhklh0TLNpFZBqA"; + /** * Creates the Hyperspace app with the appropriate Redirect URI * @param name The name of the app (if not Hyperspace, will use `name (Hyperspace-like)`)