Updated the RequestUtil.js
This commit is contained in:
parent
96965bbb1d
commit
41a283e25f
@ -1,6 +1,5 @@
|
|||||||
const DEFAULT_URL = process.env.NODE_ENV === 'production' ? "https://tools-api.gnmyt.dev/" : "http://localhost:7182/";
|
const getURL = () => process.env.NODE_ENV === 'production' ? (localStorage.getItem("url") || "https://tools-api.gnmyt.dev/")
|
||||||
|
: "http://localhost:7182/";
|
||||||
const getURL = () => localStorage.getItem("url") || DEFAULT_URL;
|
|
||||||
|
|
||||||
// Run a plain request with all default values
|
// Run a plain request with all default values
|
||||||
export const request = (path, method = "GET", body = {}, headers = {}) => {
|
export const request = (path, method = "GET", body = {}, headers = {}) => {
|
||||||
|
Reference in New Issue
Block a user