Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
feat: support get api url from localstorage (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby authored Nov 30, 2021
1 parent 5f893aa commit 3f7ffa7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/api-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import store from '@/store'
import { message, notification } from 'ant-design-vue'
import { isObject } from './util'

const apiUrl = process.env.VUE_APP_API_URL ? process.env.VUE_APP_API_URL : 'http://localhost:8080'
const storedApiUrl = localStorage.getItem('apiUrl')

const apiUrl = storedApiUrl ? storedApiUrl : process.env.VUE_APP_API_URL

const haloRestApiClient = new HaloRestAPIClient({
baseUrl: apiUrl
Expand Down

0 comments on commit 3f7ffa7

Please sign in to comment.