change api url

This commit is contained in:
kandrusyak
2022-12-20 21:01:10 +03:00
parent 75e4b9cecb
commit e9a9c20fb5
4 changed files with 6 additions and 6 deletions

View File

@@ -717,7 +717,7 @@ export function clientsServer() {
},
],
}));
this.passthrough("http://45.84.227.122:8080/**");
this.passthrough("https://astra-dev.dopcore.com/**");
this.get("/api/detail/:id", (schema, request) => {
let id = request.params.id;
return clientDetail.find((el) => el.person_id === id);

View File

@@ -33,7 +33,7 @@ export default {
return {
isOpenForm: false,
updatedClients: false,
url: "http://45.84.227.122:8080",
url: "https://astra-dev.dopcore.com",
createdClientId: "",
};
},

View File

@@ -85,14 +85,14 @@ export default {
localStorage.password = this.user.password;
},
async auth(token) {
let res = await fetch("http://45.84.227.122:8080/auth/users/me/", {
let res = await fetch("https://astra-dev.dopcore.com/auth/users/me/", {
headers: {
Authorization: `Bearer ${token}`,
},
});
res = await res.json();
let data = await fetch(
`http://45.84.227.122:8080/accounts/users/${res.id}/detail`,
`https://astra-dev.dopcore.com/accounts/users/${res.id}/detail`,
{
headers: {
Authorization: `Bearer ${token}`,
@@ -109,7 +109,7 @@ export default {
headers: { "Content-Type": "application/json" },
body: JSON.stringify(this.user),
};
fetch("http://45.84.227.122:8080/auth/jwt/create/", requestOptions)
fetch("https://astra-dev.dopcore.com/auth/jwt/create/", requestOptions)
.then((result) => {
if (result.status === 200) {
return result.json();

View File

@@ -2,7 +2,7 @@ import router from "@/router";
function prepareUrl(url) {
if (url.startsWith("http")) return url;
return `http://45.84.227.122:8080/api/${url}`;
return `https://astra-dev.dopcore.com/api/${url}`;
}
function handleRequest(method, url, headers, attempts, body, type) {