From 1a05b7e4f1016c29fd9ff340a517dc666d8c2e3e Mon Sep 17 00:00:00 2001 From: Jake Fulmine Date: Thu, 10 Aug 2023 18:36:29 +0200 Subject: [PATCH] tweak(dashboard): allow overriding api url using localstorage --- dashboard/src/api/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/src/api/index.ts b/dashboard/src/api/index.ts index 260bb0b2..a9ba89e2 100644 --- a/dashboard/src/api/index.ts +++ b/dashboard/src/api/index.ts @@ -1,7 +1,7 @@ import axios from 'axios'; import * as Sentry from '@sentry/browser'; -const baseUrl = () => localStorage.isBeta ? "https://api.beta.pluralkit.me" : "https://api.pluralkit.me"; +let baseUrl = () => localStorage.getItem("pk_api_url") ? localStorage.pk_api_url : localStorage.isBeta ? "https://api.beta.pluralkit.me" : "https://api.pluralkit.me"; const methods = ['get', 'post', 'delete', 'patch', 'put']; const noop = () => {};