[WIP] Добавил отображение сотрудников на графике, поправил стили, изменил запросы логина

This commit is contained in:
megavrilinvv
2022-12-22 18:18:43 +03:00
parent 838266c0e9
commit 3773c15ad5
6 changed files with 145 additions and 104 deletions

View File

@@ -5,11 +5,6 @@ function prepareUrl(url) {
return `https://astra-dev.dopcore.com/api/${url}`;
}
function prepareUrlApi(url) {
if (url.startsWith("http")) return url;
return `https://astra-dev.dopcore.com/${url}`;
}
function handleRequest(method, url, headers, attempts, body, type) {
return new Promise((resolve, reject) => {
(function internalRequest() {
@@ -72,9 +67,7 @@ function request(method, url, headers = {}, body, type = "") {
body: JSON.stringify(body),
};
}
if (type === "api") {
return fetch(prepareUrlApi(url), requestOptions);
} else return fetch(prepareUrl(url), requestOptions);
return fetch(prepareUrl(url), requestOptions);
}
function get(url, type, headers, attempts = 3) {