[WIP] Добавил отображение сотрудников на графике, поправил стили, изменил запросы логина
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user