Мелкий рефакторинг

This commit is contained in:
Book Pauk
2019-01-01 23:08:13 +07:00
parent 90ff4e1e58
commit 9e00e7356f

View File

@@ -1,15 +1,14 @@
import axios from 'axios';
const api = axios.create({
baseURL: '/api'
});
class Misc {
async loadConfig() {
const response = await axios.post('/api/config', {params: ['name', 'version']});
const response = await api.post('/config', {params: ['name', 'version']});
return response.data;
}
}
let misc = null;
if (!misc) {
misc = new Misc();
}
export default misc;
export default new Misc();