mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-26 15:02:21 +03:00
последняя рабочая версия
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
<title>IoT Manager 4.5.1</title>
|
||||
|
||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/build/bundle.css?451" />
|
||||
<link rel="stylesheet" href="/build/bundle.css?4511" />
|
||||
|
||||
<script defer src="/build/bundle.js?451"></script>
|
||||
<script defer src="/build/bundle.js?4511"></script>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
|
||||
@@ -104,42 +104,18 @@
|
||||
}
|
||||
};
|
||||
|
||||
//иногда не отправляет токен - непонятно почему
|
||||
//const placeOrder = async () => {
|
||||
// delete myProfileJson["_id"];
|
||||
// const JWT = Cookies.get("token_iotm2");
|
||||
// try {
|
||||
// let res = await fetch("https://portal.iotmanager.org/compiler/order", {
|
||||
// mode: "cors",
|
||||
// method: "POST",
|
||||
// headers: {
|
||||
// "Content-Type": "application/json",
|
||||
// Authorization: `Bearer ${JWT}`,
|
||||
// },
|
||||
// body: JSON.stringify(myProfileJson),
|
||||
// });
|
||||
// const content = await res.json();
|
||||
// if (res.ok) {
|
||||
// errors = [{ msg: "ok_success" }];
|
||||
// await getUserBuilds();
|
||||
// console.log(content.message);
|
||||
// } else {
|
||||
// errors = content.message;
|
||||
// }
|
||||
// } catch (e) {
|
||||
// console.log(e);
|
||||
// }
|
||||
//};
|
||||
|
||||
//временно используем без jwt
|
||||
const placeOrder = async () => {
|
||||
delete myProfileJson["_id"];
|
||||
//добавим в тело имя пользователя
|
||||
myProfileJson.username = userdata.username;
|
||||
const JWT = Cookies.get("token_iotm2");
|
||||
try {
|
||||
let res = await fetch("https://portal.iotmanager.org/compiler/esporder", {
|
||||
let res = await fetch("https://portal.iotmanager.org/compiler/order", {
|
||||
mode: "cors",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${JWT}`,
|
||||
},
|
||||
body: JSON.stringify(myProfileJson),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user