bonus-ui/src/utils/config.js

22 lines
517 B
JavaScript

import { getConfig,getMinIoUrl } from '@/api/config'
export function get() {
getConfig()
.then(response => {
localStorage.setItem('systemConfig', JSON.stringify(response.data))
})
.catch(error => {
console.error('Failed to fetch config:', error)
})
}
export function getMinioUrl() {
getMinIoUrl()
.then(response => {
localStorage.setItem('minIoUrl', JSON.stringify(response.data))
})
.catch(error => {
console.error('Failed to fetch config:', error)
})
}