diff --git a/.eslintrc.json b/.eslintrc.json index 5ce3ece..ef9b39e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -70,7 +70,7 @@ "multiline-comment-style": ["warn", "starred-block"], "new-cap": "warn", "new-parens": "warn", - "newline-per-chained-call": ["warn", {"ignoreChainWithDepth": 1}], + "newline-per-chained-call": ["warn", {"ignoreChainWithDepth": 3}], "no-bitwise": "warn", "no-inline-comments": "warn", "no-lonely-if": "warn", diff --git a/src/api/StorageLogsAPI.js b/src/api/StorageLogsAPI.js index 3b0d702..a49538b 100644 --- a/src/api/StorageLogsAPI.js +++ b/src/api/StorageLogsAPI.js @@ -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; } } diff --git a/src/app.html b/src/app.html index ca7f3ce..3b93ce4 100644 --- a/src/app.html +++ b/src/app.html @@ -76,7 +76,7 @@ - + - +