HM-58. Добавлен новый тип логов client-logs (#21)
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user