HM-58. Добавлен новый тип логов client-logs (#21)

This commit is contained in:
Nikolay
2020-07-20 00:29:06 +03:00
committed by GitHub
parent 47fe69bc65
commit 05b43cac78
8 changed files with 232 additions and 67 deletions

View File

@ -2,10 +2,25 @@ import axios from 'axios';
import {API_URL, ENDPOINTS} from './consts';
class StorageLogsApi {
URL = `${API_URL}${ENDPOINTS.SERVER_LOGS}`;
URL = `${API_URL}`;
request = async () => {
const {data} = await axios.get(this.URL);
requestServerLogs = async () => {
const {data} = await axios.get(`${this.URL}${ENDPOINTS.SERVER_LOGS}`);
return data;
}
requestClientLogs = async () => {
const {data} = await axios.get(`${this.URL}${ENDPOINTS.CLIENT_LOGS}`);
return data;
}
deleteAllServerLogs = async () => {
const {data} = await axios.delete(`${this.URL}${ENDPOINTS.SERVER_LOGS}`);
return data;
}
deleteAllClientLogs = async () => {
const {data} = await axios.delete(`${this.URL}${ENDPOINTS.CLIENT_LOGS}`);
return data;
}
}