32 lines
907 B
JavaScript
32 lines
907 B
JavaScript
import Api from '@/services/Api'
|
|
import axios from 'axios'
|
|
|
|
export default {
|
|
getPublicSettings (params) {
|
|
return Api().get('/v1/server/settings')
|
|
},
|
|
getAllSettings () {
|
|
return Api().get('/v1/server/settings?all=1')
|
|
},
|
|
getStatus () {
|
|
return Api().get("/v1/status/check")
|
|
},
|
|
getAPIUrl () {
|
|
return new Promise((resolve, reject) => {
|
|
axios.get('/apiurl')
|
|
.then(function (response) {
|
|
// handle success
|
|
localStorage.setItem("apiURL", atob(response)+`api/`)
|
|
resolve();
|
|
})
|
|
.catch(function (error) {
|
|
if(error.response.status) {
|
|
localStorage.setItem("apiURL", process.env.VUE_APP_API_URL+`api/`)
|
|
resolve();
|
|
}
|
|
});
|
|
})
|
|
|
|
}
|
|
}
|