tweak(dashboard): allow overriding api url using localstorage

This commit is contained in:
Jake Fulmine 2023-08-10 18:36:29 +02:00 committed by Iris System
parent 93d94dbc2c
commit 1a05b7e4f1

View file

@ -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 = () => {};