HM-63. Переключение api через консоль браузера (#22)

This commit is contained in:
Nikolay
2020-07-20 23:29:24 +03:00
committed by GitHub
parent 05b43cac78
commit 1815fb62d9
6 changed files with 139 additions and 18 deletions

View File

@ -1,8 +1,12 @@
import axios from 'axios';
import {API_URL, ENDPOINTS} from './consts';
import {ENDPOINTS} from './consts';
import adminConfigsService from '../services/AdminConfigsService';
class StorageLogsApi {
URL = `${API_URL}`;
constructor () {
const {url} = adminConfigsService.getApi();
this.URL = url;
}
requestServerLogs = async () => {
const {data} = await axios.get(`${this.URL}${ENDPOINTS.SERVER_LOGS}`);